how to get woocommerce product price
$_product->get_regular_price();
$_product->get_sale_price();
$_product->get_price();
how to get woocommerce product price
$_product->get_regular_price();
$_product->get_sale_price();
$_product->get_price();
WooCommerce Add Text after Price to Specific Product or Products
add_filter( 'woocommerce_get_price_html', 'njengah_text_after_price' );
function njengah_text_after_price($price){
global $post;
$product_id = $post->ID;
$product_array = array( 1,2,3 );//add in the product IDs to add text after price
if ( in_array( $product_id, $product_array )) {
$text_to_add_after_price = ' text to add after price for the specific products '; //change text in bracket to your preferred text
return $price . $text_to_add_after_price;
}else{
return $price;
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us