Skip to content

Instantly share code, notes, and snippets.

@n9yty
n9yty / wc_calc_shipping_after_coupon.php
Created March 17, 2020 18:39 — forked from ejntaylor/functions.php
WooCommerce Shipping Calculated after Coupon
<?php
// WooCommerce Shipping Calculated after Coupon
add_filter( 'woocommerce_shipping_free_shipping_is_available', 'filter_shipping', 10, 2 );
function filter_shipping( $is_available, $package ) {
if ( WC()->cart->prices_include_tax )
$total = WC()->cart->cart_contents_total + array_sum( WC()->cart->taxes );
else