-1

so I have run google search console on my website and I have a problem on priceValidUntil of the product schema on woocommerce specificly on product -> offers -> priceValidUntil, so I went to check and created this small snippet, but seems the snippet is not running anything wrong on my code?

// define the woocommerce_structured_data_product_offer callback 
function filter_woocommerce_structured_data_product_offer( $entity ) { 
    // make filter magic happen here... 
    $entity['offers']['priceValidUntil'] = '3050-01-01';

    return $entity; 
}; 

// add the filter 
add_filter( 'woocommerce_structured_data_product_offer', 'filter_woocommerce_structured_data_product_offer', 10, 2 ); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.