This thread is resolved. Here is a description of the problem and solution.
Problem:
When using Multilingual & Multicurrency for WooCommerce with Barn2 WooCommerce Product Options, the additional option prices disappear after ordering. The prices are added together until the order button is clicked, but these additional prices are not reflected in the order confirmation.
Solution:
We have identified a workaround while we and Barn2's team investigate the issue further. Please ensure you have a backup of your site before proceeding. Add the following code to your
functions.php
file:
add_action( 'woocommerce_before_checkout_process', function () {<br /> global $wp_filter;<br /> $hook_name = 'woocommerce_before_checkout_process';<br /> if ( empty( $wp_filter[ $hook_name ] ) ) {<br /> return;<br /> }<br /> $hook = $wp_filter[ $hook_name ];<br /> foreach ( $hook->callbacks as $priority => $callbacks ) {<br /> foreach ( $callbacks as $id => $data ) {<br /> $func = $data['function'];<br /> if (<br /> is_array( $func ) &&<br /> is_object( $func[0] ) &&<br /> $func[1] === 'wcml_refresh_cart_total'<br /> ) {<br /> remove_action( $hook_name, $func, $priority );<br /> }<br /> }<br /> }<br />}, 1 );After implementing this code, make a minor change to the original product and update its translation. If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your specific case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.
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 7 replies, has 0 voices.
Last updated by 1 month ago.
Assisted by: Lucas Vidal de Andrade.

