Created
January 23, 2025 01:21
-
-
Save rajeshsingh520/e2586ced17ac64f60a0cb50ed2eff5a8 to your computer and use it in GitHub Desktop.
bogo change product variation option below price column in cart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_cart_item_price', function($price, $cart_item, $cart_item_key){ | |
if(class_exists('pisol_bogo_change_option')){ | |
if(pisol_bogo_change_option::showChangeOptionButton($cart_item)){ | |
$price .= '<br>'.pisol_bogo_change_option::addChangeOptionButton($cart_item, false, 'cart'); | |
} | |
if(pisol_bogo_change_option::showChangeFreeProductButton($cart_item)){ | |
$price .= '<br>'.pisol_bogo_change_option::addChangeFreeProductButton($cart_item, false, 'cart'); | |
} | |
} | |
return $price; | |
}, 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment