function update

This commit is contained in:
magepeopleteam 2021-01-26 12:06:03 +00:00
parent b1dee3a551
commit 8debd836df
1 changed files with 3 additions and 1 deletions

View File

@ -2525,7 +2525,9 @@ add_filter( 'wp_mail_content_type','mep_set_email_content_type' );
add_filter('woocommerce_cart_item_price', 'mep_avada_mini_cart_price_fixed', 100, 3); add_filter('woocommerce_cart_item_price', 'mep_avada_mini_cart_price_fixed', 100, 3);
if (!function_exists('mep_avada_mini_cart_price_fixed')) { if (!function_exists('mep_avada_mini_cart_price_fixed')) {
function mep_avada_mini_cart_price_fixed($price,$cart_item,$r){ function mep_avada_mini_cart_price_fixed($price,$cart_item,$r){
$price = wc_price($cart_item['line_total']); if(array_key_exists('event_id',$cart_item) && get_post_type($cart_item['event_id']) == 'mep_events' ){
$price = wc_price( mep_get_price_including_tax($cart_item['event_id'],$cart_item['event_tp']));
}
return $price; return $price;
} }
} }