Skip to content

Instantly share code, notes, and snippets.

Alexander Huỳnh huynhjabao1997

Block or report user

Report or block huynhjabao1997

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Bỏ vào Function.php để thay đổi giá 0 thành Liên hệ
// Price 0 -> Liên hệ
function devvn_wc_custom_get_price_html( $price, $product ) {
if ( $product->get_price() == 0 ) {
if ( $product->is_on_sale() && $product->get_regular_price() ) {
$regular_price = wc_get_price_to_display( $product, array( 'qty' => 1, 'price' => $product->get_regular_price() ) );
$price = wc_format_price_range( $regular_price, __( 'Free!', 'woocommerce' ) );
} else {
$price = '<span class="amount" style="color: red">' . __( 'Liên hệ', 'woocommerce' ) . '</span>';
}
You can’t perform that action at this time.