From 5c4799e64b60bae7ed66627ceabdbec68019f461 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 22 May 2012 09:30:14 +0100 Subject: [PATCH] woocommerce_shipping_chosen_method hook --- classes/shipping/class-wc-shipping.php | 2 +- readme.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/shipping/class-wc-shipping.php b/classes/shipping/class-wc-shipping.php index e95b6c26273..688130b0cf8 100644 --- a/classes/shipping/class-wc-shipping.php +++ b/classes/shipping/class-wc-shipping.php @@ -120,7 +120,7 @@ class WC_Shipping { // If not set, set a default if ( empty( $chosen_method ) || ! isset( $_available_methods[$chosen_method] ) ) { - $chosen_method = get_option('woocommerce_default_shipping_method'); + $chosen_method = apply_filters( 'woocommerce_shipping_chosen_method', get_option('woocommerce_default_shipping_method'), $_available_methods ); // Loops methods and find a match if ( ! isset( $_available_methods[$chosen_method] ) ) { diff --git a/readme.txt b/readme.txt index 26f718b7e4f..bf9ff76555f 100644 --- a/readme.txt +++ b/readme.txt @@ -149,6 +149,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc == +* Tweak - woocommerce_shipping_chosen_method hook * Tweak - Layered nav child taxonomies support * Tweak - Change debug page to status page to make it more noticeable. * Tweak - Broken up settings pages to ease development