• Resolved kees78

    (@kees78)


    On the Yoast website, i see the following filter described:
    https://developer.yoast.com/features/schema/pieces/product/
    including an example:

    add_filter( 'wpseo_schema_product', 'example_change_product' );
    /** * Adds the color to the product schema. *
    * @param array $data The Schema Product data. *
    * @return array Schema.org Product data array. */

    function example_change_product( $data ) {
    $data['color'] = 'red';
    return $data;
    }

    If i add this to a custom plugin, nothing happens in the schema output on a product page. I cleared the cache etc. The plugin is active. Am i something missing?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Filter not working’ is closed to new replies.