Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
I have a problem with WPML and One Page Checkout plugin from Woocommerce. The problem is that One Page Checkout is using standard wordpress function url_to_postid().

Solution:
Go to wp-content/plugins/woocommerce-one-page-checkout/woocommerce-one-page-checkout.php. The function ('is_wcopc_checkout') is not needed in the backend.

Change line 87 of the said file from:

if ( empty( $post_id ) ) {

to:

if ( empty( $post_id ) && !is_admin() ) {

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 22 replies, has 3 voices.

Last updated by andreyK-12 3 months ago.

Assigned support staff: Dražen Duvnjak.

Author Posts
July 17, 2020 at 12:14 pm #6621187

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for the info.

Ok, I was able to investigate and get to the conclusion, this issue happens only when LearnDash Multilingual Integration and WooCommerce One Page Checkout activated together with WPML plugins.

If you deactivate any of those 2 or WPML plugins, everything is working fine. It could be some compatibility issues when these plugin active altogether.

I was able to get similar issue but not the same on my localhost, I am going to forward all of the information to out 2nd tier to check and advise on this case.

I will notify once I get a reply from our 2nd tier, it shouldn't take long.

Thanks for your collaboration and patience

Regards,
Drazen

July 17, 2020 at 12:18 pm #6621193

andreyK-12

Thank you! I am waiting for a reply.

July 17, 2020 at 2:31 pm #6622227

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I got an update from ou 2nd tier, after checking the issue they confirmed that issue is happening due to url_to_postid() being called from
wp-content/plugins/woocommerce-one-page-checkout/woocommerce-one-page-checkout.php:96.

This ticket will be escalated to our Compatibility team to check and advise on this issue.

In the meantime, I would like to ask you to kindly invite plugin author to join our Go Global program and work together with our developers in making this plugin compatible with WPML.

- https://wpml.org/documentation/theme-compatibility/go-global-program/

Please also explain and report this issue to their support, suggest if they can use other functions in this case, to avoid compatibility issues with WPML.

We will contact plugin authors also, but the same coming from their client might help speed up the process.

I will be marking this ticket as " Escalated to Compatibility team" and will update you as soon as I have some news on this.

Thanks and regards,
Drazen

July 17, 2020 at 2:42 pm #6622317

andreyK-12

Okay, thank you for.

July 20, 2020 at 7:03 am #6630965

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I got an update and quick fix from our developer's team:

- wp-content/plugins/woocommerce-one-page-checkout/woocommerce-one-page-checkout.php:96

This function ('is_wcopc_checkout') is not needed in the backend. If you check the functions doc:

/**
 * Function that devs can use to check if a page includes the OPC shortcode
 *
 * @since 1.1
 */

so, we think it is safe to change line 87 of the said file from:

	if ( empty( $post_id ) ) {

to:

	if ( empty( $post_id ) && !is_admin() ) {

that fixed the issue for me, can you please check and update us if it works for you?

Thanks and regards,
Drazen

July 20, 2020 at 9:08 am #6631801

andreyK-12

Hi! Thank you, that walkaround helped. Waiting for permanent solution.

July 20, 2020 at 1:16 pm #6634907

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for getting back.

As you can see our developers suggested change in the plugin code, I think it is not something that can be fixed on the WPML side, we did our best to find a workaround so you can continue your work with WPML.

Can you please contact the plugin author and suggest to check and include this fix in their plugin. They can always join our compatibility program and we will be glad to help them out.

I hope we were helpful.

Let me know if there is anything else I can do for you. 🙂

Thanks,
Drazen

July 21, 2020 at 6:46 am #6640317

andreyK-12

My issue is resolved now. Thank you!