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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 -

Supporter timezone: Europe/Zagreb (GMT+01:00)

This topic contains 0 replies, has 0 voices.

Last updated by Dražen 6 days, 13 hours ago.

Assisted by: Dražen.

Author Posts
January 26, 2025 at 2:24 pm #16635257

davidB-295

Background of the issue:
I was trying to access the orders list after updating to the RC 5.4.0-rc.1 update. The issue is caused by the woocommerce-multilingual plugin. Here is the error trace: An error of type E_ERROR was caused in line 52 of the file /home/html/adm.dental/_sub/beta/wp-content/plugins/woocommerce-multilingual/classes/OrderItems/Shipping/ShippingMethod.php. Error message: Uncaught Error: Call to a member function get_title() on bool in /home/html/adm.dental/_sub/beta/wp-content/plugins/woocommerce-multilingual/classes/OrderItems/Shipping/ShippingMethod.php:52. It seems that it is caused by this code: $shippingMethod = WC_Shipping_Zones::get_shipping_method( $shippingInstanceId ); if ( $shippingTitle === $shippingMethod->get_title() ) { $item->set_method_title( $this->woocommerce_wpml->shipping->translate_shipping_method_title( $shippingTitle, $shippingId . $shippingInstanceId, $targetLanguage ) ); return; } get_shipping_method( $shippingInstanceId ); returns false, because it did not found the shipping method as described here: hidden link::get_shipping_method. Link to a page where the issue can be seen: hidden link

Symptoms:
I encountered a critical error in the orders panel, specifically a 'Call to a member function get_title() on bool' fatal error. I expected to see a list of orders but only saw the first two orders, then half of #2277 where the error occurred.

Questions:

January 27, 2025 at 7:12 am #16635980

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for contacting us.

1) Can you please try next:

- Make sure you have a backup.
- Disable all other plugins and leave active only WPML plugins and Wocommerce
- Switch to WP default theme
- Check if the issue still happens.

2) If the issue still happens, please create a staging site and share admin access with us so we can further check and escalate this issue. Note we might need to take a copy of your site, let me know if that is not okay.

Regards,
Drazen

January 31, 2025 at 1:47 pm #16655906

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for sharing the details.

I checked and I see the issue is not happening when I disable WCML, and also see there is a shipping method "PPL na adresu".

How is this being added or how can I edit it? I can not seem to find it inside the Wocommerce settings.

Regards,
Drazen

February 2, 2025 at 3:59 pm #16660269

davidB-295

Yes, the issue is caused by WCML. “PPL na adresu” is a shipping method included in the PPL plugin. Once you activate the plugin, you can configure this method in WooCommerce shipping settings: hidden link

February 3, 2025 at 7:07 am #16661100

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks.

I have escalated this to our 2nd tier for further check.

I will update you soon.

Regards,
Drazen

February 3, 2025 at 9:39 am #16661924

Dražen
Supporter

Languages: English (English )

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

Hello,

it escalated to our developers for a further fix, a a workaround please use next:

- in the file: wp-content/plugins/woocommerce-multilingual/classes/OrderItems/Shipping/ShippingMethod.php find

		$shippingMethod = \WC_Shipping_Zones::get_shipping_method( $shippingInstanceId );

add this after it:

		if ($shippingMethod === false ){
			return;
		}

Regards,
Drazen