I have 2 shipping methods defined:
WC()->session->[chosen_shipping_methods] => a:1:{i:0;s:17:"table_rate-5 : 70";}
WC()->session->get('chosen_shipping_methods');
WC()->session->set('chosen_shipping_methods', $chosen_method);
chosen_shipping_methods
woocommerce_shipping_method_chosen
This is what I ended up using which worked as required:
/*=Use the shipping method filter to set the "selected" shipping method to
* the first (default) method in the list
**************************************************************************/
function oley_reset_default_shipping_method( $method, $available_methods ) {
$method = key($available_methods);
return $method;
}
add_filter('woocommerce_shipping_chosen_method', 'oley_reset_default_shipping_method', 10, 2);
(NOTE: This worked because the shipping rate I wanted was actually the first in the list but just wasn't being selected by default)