Hi @xue28
Thanks for your reply. Yes, woocommerce_sale_flash
hook does not work in Hand-picked Products block.
The code snippet is below and I attach two screen shots for shop page which displays modified label via hook correctly and Hand-picked Products Block wihich does not call hook and does not display modified label for the same product.
function go_custom_sale_label( $label, $post, $product ){
error_log("Original sale label is $label");
return '<span class="onsale">X% Discount</span>'; //Simplified for demo purposes
}
add_filter( 'woocommerce_sale_flash', 'go_custom_sale_label', 10, 3 );
Shop Page
https://prnt.sc/_HsvvLmeuHHP
Hand-picked Block
https://prnt.sc/9OJYXT9tLWfC
Thanks for your help,
-
This reply was modified 2 years, 1 month ago by OldCoffeeMan.
-
This reply was modified 2 years, 1 month ago by OldCoffeeMan.
-
This reply was modified 2 years, 1 month ago by OldCoffeeMan.