Skip to content

Commit

Permalink
Update class-angelleye-paypal-ppcp-seller-onboarding.php
Browse files Browse the repository at this point in the history
Added check for variable $paypal_vault_supported_country type to be an array.

Reason:
PHP Fatal error: Uncaught TypeError: in_array(): Argument angelleye#2 ($haystack) must be of type array, null given in wp-content/plugins/paypal-woocommerce/ppcp-gateway/class-angelleye-paypal-ppcp-seller-onboarding.php:142
  • Loading branch information
sunneyman committed Jun 6, 2024
1 parent a4efec2 commit 47f6431
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function angelleye_generate_signup_link_with_feature($testmode, $page, $b

public function angelleye_generate_signup_link_for_migration($testmode, $products) {
$this->is_sandbox = ( $testmode === 'yes' ) ? true : false;
if (in_array($this->ppcp_paypal_country, $paypal_vault_supported_country) && angelleye_ppcp_is_subscription_support_enabled() === true) {
if (is_array($paypal_vault_supported_country) && in_array($this->ppcp_paypal_country, $paypal_vault_supported_country) && angelleye_ppcp_is_subscription_support_enabled() === true) {
$body = $this->ppcp_vault_data();
} else {
$body = $this->default_data();
Expand Down

0 comments on commit 47f6431

Please sign in to comment.