File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -194,9 +194,9 @@ public static function mutate_and_get_payload() {
194194 throw new UserError ( __ ( 'Failed to add any cart items. Please check input. ' , 'wp-graphql-woocommerce ' ) );
195195 }
196196
197- $ applied = array ();
197+ $ applied = array ();
198+ $ invalid_coupons = array ();
198199 if ( ! empty ( $ input ['coupons ' ] ) ) {
199- $ invalid_coupons = array ();
200200 foreach ( $ input ['coupons ' ] as $ code ) {
201201 $ reason = '' ;
202202 // If validate and successful applied to cart, return payload.
@@ -224,15 +224,15 @@ public static function mutate_and_get_payload() {
224224 }
225225 }//end if
226226
227- $ chosen_shipping_methods = array ();
227+ $ chosen_shipping_methods = array ();
228+ $ invalid_shipping_methods = array ();
228229 if ( ! empty ( $ input ['shippingMethods ' ] ) ) {
229230 $ posted_shipping_methods = $ input ['shippingMethods ' ];
230231
231232 // Get current shipping methods.
232233 $ chosen_shipping_methods = \WC ()->session ->get ( 'chosen_shipping_methods ' );
233234
234235 // Update current shipping methods.
235- $ invalid_shipping_methods = array ();
236236 foreach ( $ posted_shipping_methods as $ package => $ chosen_method ) {
237237 if ( empty ( $ chosen_method ) ) {
238238 continue ;
You can’t perform that action at this time.
0 commit comments