Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 3 replies, has 2 voices.

Last updated by Kor 1 year, 3 months ago.

Assisted by: Kor.

Author Posts
August 22, 2023 at 9:19 am

John

We are using a plugin named WPCE - WooCommerce Parts Compatibility Editor (hidden link)

August 22, 2023 at 10:05 am
August 23, 2023 at 11:14 am #14277939

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

We apologize for the inconvenience, but in order to proceed with troubleshooting, we kindly request a site snapshot. Alternatively, with your permission, we can create a snapshot on our own.

For this purpose, we typically recommend using the free plugin "Duplicator." If you are already familiar with how Duplicator works ( https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded.

To assist you further, please follow these instructions:
Watch the Duplicator instructions video: hidden link
Refer to the instructions provided by WPML on how to provide supporters a copy of your site: https://wpml.org/faq/provide-supporters-copy-site/

If the archive file exceeds 400MB in size, please utilize Duplicator's file filters to exclude the cache, wp-uploads directory, media, and archive files.

Once you have the archive file, please share the link with us. You can use services such as Google Drive, Dropbox, or similar platforms as the snapshot file will likely be large.

Please note that your next reply will be private, visible only to you and me. You can paste the link to the file there. Rest assured that once the issue is resolved, I will delete the local site.

August 29, 2023 at 9:50 am #14305809

John

Hello,
We have managed to solve the issue with the owner of the plugin.
He provided us the following code to put in function:

// Make Dropdown Labels WPML Translateable
function wc_wpce_levels_labels ( $levels ) {
if ( is_admin () ) {
return $levels;
}

if ( isset ( $levels[0] ) ) {
$levels[0]['title'] = __( 'Marcă', 'woodmart' );
$levels[0]['dropdown_title'] = __( 'Marcă', 'woodmart' );
}

if ( isset ( $levels[1] ) ) {
$levels[1]['title'] = __( 'Model', 'woodmart' );
$levels[1]['dropdown_title'] = __( 'Model', 'woodmart' );
}

if ( isset ( $levels[2] ) ) {
$levels[2]['title'] = __( 'An', 'woodmart' );
$levels[2]['dropdown_title'] = __( 'An', 'woodmart' );
}

if ( isset ( $levels[3] ) ) {
$levels[3]['title'] = __( 'Platforma', 'woodmart' );
$levels[3]['dropdown_title'] = __( 'Platforma', 'woodmart' );
}

return $levels;
}
add_filter ( 'wpce_get_levels', 'wc_wpce_levels_labels' );

// WPCE: Make Submit Button WPML Translateable
function wc_wpce_submit_button_label ( $text ) {
if ( is_admin () ) {
return $levels;
}

$text = __( 'Cauta', 'woodmart' );

return $text;
}
add_filter ( 'wpce_label_submit_button', 'wc_wpce_submit_button_label' );

And told us the rescan the string from theme child.

Also for the button we modified a line cod from the plugin.

"2. Regarding the submit button, as the website wasn't working for me, I have written a code and need you to let me know if it works or not. You just need to scan theme strings for the word "Cauta" and let me know if it helps? For this, except doing the custom work in the child theme based functions.php file, I have done one customization in WPCE plugin file as well:
o File: /wp-content/plugins/woo-parts-compatibility-editor/lib/wpce-core-functions.php
o Searched for: get_post_meta ( $finder_id, 'wpce_submit_label', true );
o Replaced it with: apply_filters ( 'wpce_label_submit_button', get_post_meta ( $finder_id, 'wpce_submit_label', true ) );"

I hope this will help you to make the plugin to work also with WPML.
Waiting for your reply,
Thank you!

August 29, 2023 at 3:57 pm #14307799

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Glad to know that the plugin author provided some assistance.

Are you able to fix your second issue?

August 29, 2023 at 5:28 pm #14308299

John

Hello,
I don't understand what second problem you are referring to.
I was able to solve the translating issue with the fix from the author.
I have provided you the fix provided from him just in case you can solve it and make the plugin compatible with your plugin.
Thank you!