mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
https://stackoverflow.com/questions/68310570/woocommerce-hook-how-to-add-content-inside-the-feature-products-on-home-page
6 lines
280 B
Text
6 lines
280 B
Text
add_filter( 'woocommerce_get_price_html', 'theme_add_description_after_or_after_price', 2, 10 );
|
|
|
|
function theme_add_description_after_or_after_price($price, $product){
|
|
$description = ($product->is_featured()) ? 'Your HTML or text' : '';
|
|
return $price . $description ;
|
|
}
|