woocommerce_structured_data_context filter-hook . WC 1.0
Wrap the multiple values of each type inside a graph... Then add context to each type.
Usage
add_filter( 'woocommerce_structured_data_context', 'filter_function_name_330', 10, 4 ); function filter_function_name_330( $array, $data, $type, $value ){ // filter... return $array; }
- $array
- -
- $data
- -
- $type
- -
- $value
- -
Where the hook is called
woocommerce_structured_data_context
woocommerce/includes/class-wc-structured-data.php 94
$data[ $type ] = apply_filters( 'woocommerce_structured_data_context', array( '@context' => 'https://schema.org/' ), $data, $type, $value ) + $data[ $type ];
woocommerce/includes/class-wc-structured-data.php 102
$data = apply_filters( 'woocommerce_structured_data_context', array( '@context' => 'https://schema.org/' ), $data, '', '' ) + array( '@graph' => $data );