Added brackets

This commit is contained in:
Mike Jolley 2014-04-25 12:30:39 +01:00
parent cd4bf515b7
commit d168686478
1 changed files with 4 additions and 2 deletions

View File

@ -131,9 +131,11 @@ class WC_AJAX {
$chosen_shipping_methods = WC()->session->get( 'chosen_shipping_methods' );
if ( isset( $_POST['shipping_method'] ) && is_array( $_POST['shipping_method'] ) )
foreach ( $_POST['shipping_method'] as $i => $value )
if ( isset( $_POST['shipping_method'] ) && is_array( $_POST['shipping_method'] ) ) {
foreach ( $_POST['shipping_method'] as $i => $value ) {
$chosen_shipping_methods[ $i ] = wc_clean( $value );
}
}
WC()->session->set( 'chosen_shipping_methods', $chosen_shipping_methods );