Skip Navigation

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

Problem: Multicurrency selector is not working on products tabs in Woodmart theme

Solution: As a workaround, add the following code to functions.php file

add_filter( 'wcml_multi_currency_ajax_actions', function( $actions ) {
  $actions[] = 'woodmart_get_products_shortcode';
  $actions[] = 'woodmart_get_products_tab_shortcode';

  return $actions;
} );

Relevant Documentation:

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 2 voices.

Last updated by Carlos Rojas 5 months, 1 week ago.

Assigned support staff: Carlos Rojas.

Author Posts
April 25, 2020 at 6:55 pm #5993731

John

Hello,
I have also found this on other topics with the fix bellow but it doesn't working 🙁
Wpml same issue other topics:
1. https://wpml.org/forums/topic/multicurency-is-not-working-on-products-tabs/
2. https://wpml.org/forums/topic/currency-issue-2/

Some screenshots:
hidden link
After loading more or ajax tab changed currency is wrong
hidden link
or loading more on first ajax tab
hidden link

---------------
On previous support topic I have migrate my website to cloudways maybe you can use it to debug there. Thanks.
https://wpml.org/forums/topic/product-categories-images-and-custom-images-doesnt-copy/

April 25, 2020 at 7:01 pm #5993745

John

Forgot to add the supported fix:

//wpml product ajax
add_filter( 'wcml_multi_currency_ajax_actions', function( $actions ) {
  $actions[] = 'woodmart_get_products_tab_ajax';
 
  return $actions;
} );

🙁 not working unfortunate

April 28, 2020 at 12:29 pm #6012361

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hello,

I suspect that the cause of this issue is a compatibility problem between WPML and a third-party functionality. I would like to ask you to follow these steps in order to isolate the cause of the issue:
- Back up your site first before making any- change, this is for security reasons.
- Update all outdated plugins and themes. Go to Plugins -> Add new -> Commercial tab and update WPML plugins to the latest version.
- Flush all cache memory.
- Go to WPML -> Languages -> Activate the Ajax cookie option.

If the issue persists then:
- Deactivate all the plugins that are not related to WPML.
- Switch for a moment to a WordPress default theme like Twenty Seventeen.
- If the issue is gone, activate one by one to see with which one there is an interaction issue.

Could you tell me the result of these steps?

Regards,
Carlos

April 28, 2020 at 12:33 pm #6012385

John

Hello Carlos,
Have you read what I type in the first message?
This is issue is older other customers have this issue and it is theme related.
You are giving some general troubleshooting that is related to the module...
So be careful in reading what I'm typing thanks.

April 28, 2020 at 12:38 pm #6012467

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi,
Thank you for your reply.

Yes, I carefully read your previous message, but the tickets you are referring to are old, so many new versions of WPML and Woodmart theme have been released. Perhaps this is the same issue, or maybe it's a new one. I asked you to follow these general steps to isolate the cause of the issue and make sure we find the culprit so can find a solution as soon as possible 🙂

Best regards,
Carlos

April 28, 2020 at 12:41 pm #6012479

John

Well, the issue still persists and never got fixed.
The idea is that on the server only wpml and theme modules are installed.
So it is not related to other modules, it is simply the theme that started to be incompatible.
That is the reason I have to migrate the whole website to cloudways..
Let me repeat: Before I have opened this all tickets: I have tried to try to find a solution, on debugger, troubleshoot, searching on this wpml forum on theme support, but as you can see with no luck.

----
And sorry again but your messages are looking like copy/paste for me:
If the issue persists then:
- Switch for a moment to a WordPress default theme like Twenty Seventeen.
- If the issue is gone, activate one by one to see with which one there is an interaction issue.

IF I switch to other theme then of course I won't have the currency ajax tab because it is related to woodmart theme...
So?
What's the point of the message above...this is the reason I said you haven't read the message.

April 28, 2020 at 12:52 pm #6012531

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi,
I'm sorry if I gave you the wrong impression.

I usually ask the client to activate a default WordPress theme for a moment because this can flush some outdated cache memory that might exists.

In any case, I kindly ask you to give me some time while a take a deeper look at the issue on the Cloudways site. I suspect that this issue is more related to Visual Composer than Woodmart, however I don't enough information yet, so I need to run further tests until the cause of the issue is isolated.

I will get back to you as soon as I have an answer.
Regards,
Carlos

April 28, 2020 at 12:57 pm #6012545

John

The website atm is on development and there is no cache module installed on it if you are referring to that kind of cache, if not we are also tested on incognito and flush the case with shift + f5...but this is not cache related issue.
Indeed woomart is based on visual composer, there was in the past and issue with ajax search and had some issues with currency but was fixed with a similar function code as above.
I hope you understand now the issue we are facing. Thanks

April 28, 2020 at 1:27 pm #6012795

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi,
Thank you very much for your message.

I can see that you are using a custom HTML block to display the product grid. Could you describe the steps to follow in order to show the same widget on a fresh new installation?

Best regards,
Carlos

April 28, 2020 at 1:33 pm #6012907

John

Hey,
I'm using this module: hidden link

The is the code from visual composer:

[vc_row full_width="stretch_row" woodmart_bg_position="left-bottom" woodmart_disable_overflow="1" css=".vc_custom_1498055786129{margin-bottom: 0px !important;padding-bottom: 8vh !important;background-image: url(<em><u>hidden link</u></em>) !important;background-position: 0 0 !important;background-repeat: no-repeat !important;}"][vc_column 0="" css=".vc_custom_1496220834961{padding-top: 0px !important;}"][products_tabs][products_tab items_per_page="8" pagination="arrows" title="BEST SELLERS" columns="4"][products_tab items_per_page="8" pagination="arrows" title="FEATURED" columns="4"][products_tab items_per_page="8" pagination="arrows" title="SALES" columns="4"][/products_tabs][/vc_column][/vc_row]
April 28, 2020 at 2:31 pm #6013165

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi,
Thank you very much for these shortcodes.

I was able to reproduce the issue on a fresh new WordPress installation, which means that we are facing a compatibility issue between WPML and this functionality on the Woodmart theme.

For this reason, I have escalated this ticket to our compatibility team, where our compatibility specialists will take a deeper look at the issue and will try to find a solution.

I will get back to you as soon as I have an answer from them.

Regards,
Carlos

April 28, 2020 at 2:32 pm #6013167

John

Ok perfect. Thanks for update!

April 28, 2020 at 3:04 pm #6013437

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

You are welcome! 🙂

Regards,
Carlos

May 31, 2020 at 8:22 am #6258897

John

Hello Carlos any updates regarding this issue? Thanks

June 1, 2020 at 11:10 am #6264761

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi,

Our compatibility specialists are contacting the authors of the theme in order to find a final solution. In the meantime, I kindly ask you to add the following code to the functions.php file:

add_filter( 'wcml_multi_currency_ajax_actions', function( $actions ) {
  $actions[] = 'woodmart_get_products_shortcode';

  return $actions;
} );

Could you confirm that the issue is solved after adding the code?

Regards,
Carlos