• Resolved davidtrebacz

    (@davidtrebacz)


    I believe the meta tag structure that Facebook prefers has changed or is incorrect. In order to have Facebook correctly validate price and currency on my product pages I needed to change two lines in class-webdados-fb-open-graph-public.php

    $fb_additional_tags[‘property’][‘product_price_amount’] = array($product->get_price_including_tax());
    if ( function_exists(‘get_woocommerce_currency’) ) $fb_additional_tags[‘property’][‘product_price_currency’] = array(get_woocommerce_currency());

    [Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]

    The price and amount documentation for Facebook is here:
    https://developers.facebook.com/docs/reference/opengraph/object-type/product/

    I made the change to the file in the plugin and Facebook now correctly validates price and currency. Not sure if this breaks something else, but I was looking for Facebook product compatibility.

    Hopefully you can integrate in the next update -or let me know if I did something wrong.

    • This topic was modified 7 years, 10 months ago by bdbrown.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘WooCommerce Price and Currency Meta Tag Change’ is closed to new replies.