Skip to content

Instantly share code, notes, and snippets.

View boghy933's full-sized avatar
💭
Hello :)

Alexandru Bogdan Bostan boghy933

💭
Hello :)
View GitHub Profile
@boghy933
boghy933 / diable_wc_shipping_rates_cache.php
Last active September 19, 2018 10:54 — forked from chuckmo/diable_wc_shipping_rates_cache.php
Disable WooCommerce's Shipping Rates Cache
// 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);
@boghy933
boghy933 / .gitignore
Created September 12, 2017 13:41 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #