• 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Oscar Gare

    (@oscargare)

    Hi,
    How you update the product pricing in the target site? currently Price Based on Country does not support the WoooCommerce REST API to get/update product pricing by zone.

    Thread Starter Franco Farnedi

    (@farnedi)

    Hi Oscar, thanks for your reply.
    Here is the full dynamic of what happens on our sites:
    -site A with WooCommerce and Price Based on Country;
    -site B, a blog with in homepage site A’s products took with REST API from site A;
    -we update price from site A with WP interface;
    -we decide which product to show on site B with a shortcode containing products IDs.

    So, to answer your question, we update the pricing on site A and the REST API should return always updated prices on site B.

    Thanks for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error with WC REST API and sale price’ is closed to new replies.