This file contains 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
<?php | |
function wcd_disc_amt_checkout_details_func($disc_amt, $item, $cart_item_key, $values, $order){ | |
return $disc_amt * $values['quantity']; | |
} | |
add_filter('wcd_disc_amt_checkout_details', 'wcd_disc_amt_checkout_details_func', 10, 5); |
This file contains 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
<?php | |
function wcd_disc_amt_cart_details_func($disc_amt, $data, $item){ | |
return $disc_amt * $item['quantity']; | |
} | |
add_filter('wcd_disc_amt_cart_details', 'wcd_disc_amt_cart_details_func', 10, 3); |
This file contains 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
function woo_cat_disc_lite_disp_price_html($price, $product){ | |
global $wcd_model; | |
$prefix = WOO_CAT_DISC_META_PREFIX; // Get prefix | |
if ($product->is_type('simple')) { | |
$product_id = $product->get_id(); | |
$disc_data = $wcd_model->wcd_get_disc_details_from_productid($product_id); // Get discount data |