Skip to content

Commit d101dec

Browse files
committed
Prepare to handle different cases for checkout_data single value
1 parent acb24f0 commit d101dec

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

includes/class-wc-gateway-amazon-payments-advanced.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -607,10 +607,14 @@ public function use_checkout_session_data_single( $ret, $input ) {
607607
return $ret;
608608
}
609609

610-
$session = $this->get_woocommerce_data();
610+
switch ( $input ) {
611+
default:
612+
$session = $this->get_woocommerce_data();
611613

612-
if ( isset( $session[ $input ] ) ) {
613-
return $session[ $input ];
614+
if ( isset( $session[ $input ] ) ) {
615+
return $session[ $input ];
616+
}
617+
break;
614618
}
615619

616620
return $ret;

0 commit comments

Comments
 (0)