Support » Plugin: Minimum Purchase Amount For Woo Cart - For WooCommerce » Issue with shipping cost on Minimum Order Amount

  • Resolved mauricecitymap

    (@mauricecitymap)


    Hey,
    for our WooCommerce Shop, we are using your plugin, to get a minimum order amout. Its working fine, but we have an issue with our shipping cost.
    For example, the minimum order amout is 23.95€. We have 2 procuts in the cart, together they cost 3€. The message says now, we need to get items in value of 16€ instead of 20.95. The shippingcost are 4.95€. How do we get the solution that the shipping costs are not included in the calculation?
    Regards
    Maurice

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author cttalks

    (@cttalks)

    @mauricecitymap

    Thank you for reporting the issue, we have released a new update that will help you resolve this issue.

    * Please update to the latest version of the plugin & try adding the following code to the functions.php file of your theme/child_theme.

    add_filter('ct_mpac_filter_current_cart_total', 'ct_mpac_include_shipping_in_cart_total', 12, 2);
    
    if(!function_exists('ct_mpac_include_shipping_in_cart_total')) {
    	function ct_mpac_include_shipping_in_cart_total($cartTotal, $cart) {		
    		if(!empty($cart)) {
    			$totalShipping = $cart->shipping_total + $cart->shipping_tax_total;
    			$totalShipping = is_numeric($totalShipping)?$totalShipping:0;
    			$cartTotal     = $cartTotal - $totalShipping;
    			
    		}
    		return $cartTotal;
    	}
    }
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.