Remove Structured Data from WooCommerce Emails

Disable structured data from emails in WooCommerce on child sites running version 4.0.x of WooCommerce.

Snippet Type

Execute on Child Sites


function wc_remove_structured_data_from_wc_email() {
	if ( WC()->structured_data instanceof WC_Structured_Data ) {
		remove_action( 'woocommerce_email_order_details', array( WC()->structured_data, 'output_email_structured_data' ), 30 );
		remove_action( 'woocommerce_email_order_details', array( WC()->structured_data, 'generate_order_data' ), 20 );

add_action( 'woocommerce_init', 'wc_remove_structured_data_from_wc_email' );
1 Like


1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.