Skip to content

Commit ffada77

Browse files
authored
Merge pull request #294 from woocommerce/fix/271-undefined-var-warning
Avoid undefined variable warning.
2 parents 6ed4bf6 + 79233e6 commit ffada77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

includes/class-wc-gateway-payfast.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,8 @@ public function filter_currency( $currency ) {
18111811
return $currency;
18121812
}
18131813

1814-
$user_id = get_current_user_id();
1814+
$user_id = get_current_user_id();
1815+
$currency_code = null; // Initialize to avoid undefined variable notice.
18151816

18161817
// Check if the currency is set in the URL.
18171818
if ( isset( $_GET['currency'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended

0 commit comments

Comments
 (0)