Skip to content

Instantly share code, notes, and snippets.

View sivasubramanianj2002's full-sized avatar

Siva Subramanian sivasubramanianj2002

View GitHub Profile
@sivasubramanianj2002
sivasubramanianj2002 / checkout-upsell-woocommerce.php
Created October 30, 2025 12:23
Upsell: Curcy pro exchange rate conflict when converting to higher exchange rate currency for Cart upsell
add_filter('cuw_cart_item_offer_price', function ($price, $cart_item, $offer) {
if (method_exists('Discount', 'getPrice')) {
$price = \Discount::getPrice($cart_item['data'], $offer['discount']);
}
if (class_exists('\WOOMULTI_CURRENCY_F_Data') || class_exists('\WOOMULTI_CURRENCY_Data')) {
$rate = 1;
if (class_exists('\WOOMULTI_CURRENCY_F_Data')) {