PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Starting coin not working correctly

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hello, we've noticed that sometimes when users log in, they don't find the initial currency configured (Argentine pesos) in their browser.

It's a random error that caught our attention and may have something to do with the main problem we've detected.

We have a store that uses Divi BodyCommerce (a plugin that uses AJAX for the product grid). When a user enters the store:

https://escuelacaninaselva.com/tienda/
they usually see the initial currency (Argentine pesos), but as soon as they make a selection, the currency remains the same for a few seconds and then changes to US dollars (which is the store's currency):

https://escuelacaninaselva.com/tienda/?filter=true&product_cat=alimentacion

How can I force the currency we set as the initial currency to perform this function?

Thanks.

 

Hello!

The problem is that Divi BodyCommerce doesn't apply FOX price filters when rendering products via AJAX.
This is an issue on Divi BodyCommerce plugin side - they are not using standard WooCommerce functions for displaying prices, so FOX price conversion doesn't work in their AJAX responses.
What you need to do:

Contact Divi BodyCommerce support and tell them:

Their AJAX product output doesn't apply WooCommerce price filters
They must use $product->get_price_html() instead of direct database queries
They need to ensure all WooCommerce hooks are triggered in AJAX responses

Temporary workaround:
Try disabling AJAX in Divi BodyCommerce settings and use standard page reload for filters instead.

Why this happens:
FOX converts prices using WooCommerce filters like woocommerce_get_price_html, raw_woocommerce_price, etc. If Divi BodyCommerce bypasses these filters and takes prices directly from database - FOX cannot convert them.

Hi, thanks for the reply. From that day on, I started communicating with the Divi Bodicommerce team, and after some research, they responded as follows,

Response from the Divi Engine (BodyCommerce) team:

It has nothing to do with $product->get_price_html() like they suggested as it works on load and on filter we call the same code so it would work.

The main difference is before we were using ajax to filter but changed to rest api which is faster and better.

Can you reach out to them and ask if there is a filter or something we should be doing in Rest to make it work?

We had a filter for ajax and I cant find anything in their documentation.

Is there any documentation or suggestion you can provide to help them correct this problem?

Thank you so much for your help and support with this problem.

David.

Hello David

This is the problem - how to define what is the current currency user selected using rest api? Selected currency is in session or in db transient, so if to apply filter request should be also send with filter REST API selected currency, which can be get by code:

global $WOOCS;

return $WOOCS->current_currency;

If they will inbuilt this fiels its possible (maybe even trought hook, like $current_currency=apply_filter('BODYCOMMERCE_SELECTED_CURRENCY','') to make it universal for all plugins), we just created REST api for such cases, you can share purchase code in this ticket private area and I will provide you updated version where there are some rest api functionality, example:

We just sent the purchase code. Thank you.

Super, see please link for update version in the private area of this ticket. Remeber that BodyCommerce need to set selected currency. Please let me know how is it going ...