woocommerce_structured_data_online_store │ filter-hook │ WC 11.3.0

Filters the store and return-policy structured data on the policy page.

Usage

add_filter( 'woocommerce_structured_data_online_store', 'wp_kama_woocommerce_structured_data_online_store_filter', 10, 2 );

/**
 * Function for `woocommerce_structured_data_online_store` filter-hook.
 * 
 * @param array   $markup Structured data for the online store.
 * @param WP_Post $page   Selected refund and returns policy page.
 *
 * @return array
 */
function wp_kama_woocommerce_structured_data_online_store_filter( $markup, $page ){
	// filter...
	return $markup;
}
$markup(array)
Structured data for the online store.
$page(WP_Post)
Selected refund and returns policy page.

Changelog

Since 11.3.0 Introduced.

Where the hook is called

WC_Structured_Data::generate_online_store_data()
woocommerce_structured_data_online_store
woocommerce/includes/class-wc-structured-data.php 674
$markup = apply_filters( 'woocommerce_structured_data_online_store', $markup, $page );

Where the hook is used in WooCommerce

Usage not found.