Support » Plugin: WooCommerce » Remove Price Form JSON structured data

  • I want to remove ONLY the price from the JSON/LD structured data, I found this function that removes ALL the structured data but I only have a problem with the price being shown. Any ideas?

    /*http://manzur-ashraf-seo-melbourne.com/coding/remove-the-woocommerce-3-jsonld-structured-data-format/
     * Remove the default WooCommerce 3 JSON/LD structured data format
     */
    function remove_output_structured_data() {
      remove_action( 'wp_footer', array( WC()->structured_data, 'output_structured_data' ), 10 ); // Frontend pages
      remove_action( 'woocommerce_email_order_details', array( WC()->structured_data, 'output_email_structured_data' ), 30 ); // Emails
    }
    
    add_action( 'init', 'remove_output_structured_data' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Remove Price Form JSON structured data’ is closed to new replies.