Error with WC REST API and sale price
-
I’m using WC_API_Client to share products info between 2 sites, but what happens is that on target site I get the wrong information.
On source site there’s no error, but on target site the JSON I get has the two prices switched, showing the sale price in<del>
attribute and with strikethrough effect, while the regular price is showed as if it was the sale one.This is an example of the HTML contained in the JSON response:
<del><span class="woocommerce-Price-amount amount">40,60<span class="woocommerce-Price-currencySymbol">€</span></span></del> <ins><span class="woocommerce-Price-amount amount">58,00<span class="woocommerce-Price-currencySymbol">€</span></span></ins>
As you can see 40.60 is showed as the regular price, and 58.00 as the sale price. This doesn’t happen with products using traditional WooCommerce price.
Can you help me with this error?
Kind regards.
- The topic ‘Error with WC REST API and sale price’ is closed to new replies.