• Resolved artemis21

    (@artemis21)


    Hello,
    I’d like to remove price and stock info from the Google reults page (https://imgur.com/a/8fe2FJy). I have added this code in my functions.php but still they show up in the snippets. How can I remove them?
    my code

    function remove_output_structured_data() {
    remove_action( 'wp_footer', array( WC()->structured_data, 'output_structured_data' ), 10 ); // Structured data from frontend pages
    remove_action( 'woocommerce_email_order_details', array( WC()->structured_data, 'output_email_structured_data' ), 30 ); // Data from emails
    }
    add_action( 'init', 'remove_output_structured_data' );

    Thank you

Viewing 1 replies (of 1 total)
  • Hi @artemis21

    Thanks for reaching out!

    I understand that you want to remove the price and stock information of your site from Google search results.

    I found a similar thread related to your inquiry here. Can you please check the proposed solutions and see if that works for you?

    Meanwhile, this forum is mainly focused on hte core functionalities of WooCommerce. What you want to achieve is a bit complex and would require customization to do it. Since custom coding is outside our scope of support, I am leaving this thread open for a bit to see if anyone can chime in to help you out.

    We have our WooCommerce Developer Resources Portal that can help you get going.

    You can also visit the WooCommerce Community Forum, the WooCommerce FB group, or the #developers channel of our Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, too.

    Another option is to check our customizations page to hire an expert that can create a custom solution for you: https://woocommerce.com/experts/

Viewing 1 replies (of 1 total)

The topic ‘Remove price and stock from Google results’ is closed to new replies.