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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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
// essentially disable WooCommerce's shipping rates cache | |
add_action('woocommerce_checkout_update_order_review', 'clear_wc_shipping_rates_cache'); | |
function clear_wc_shipping_rates_cache(){ | |
$packages = WC()->cart->get_shipping_packages(); | |
foreach ($packages as $key => $value) { | |
$shipping_session = "shipping_for_package_$key"; | |
unset(WC()->session->$shipping_session); |