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();
display only price from selected variable woocommerce
add_action('woocommerce_before_add_to_cart_form', 'selected_variation_price_replace_variable_price_range');
function selected_variation_price_replace_variable_price_range(){
global $product;
if( $product->is_type('variable') ):
?><style> .woocommerce-variation-price {display:none;} </style>
<script>
jQuery(function($) {
var p = 'p.price';
$('form.cart').on('show_variation', function( event, data ) {
$(p).html(data.price_html);
}).on('hide_variation', function( event ) {
$(p).html($(a).html());
});
});
</script>
<?php
endif;
}
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