Skip to content

Commit

Permalink
PFW-1804, Remove PFWMA condition for migration
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed Jun 13, 2024
1 parent 43b62bb commit b74867c
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 32 deletions.
3 changes: 0 additions & 3 deletions ppcp-gateway/class-angelleye-paypal-ppcp-admin-action.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,6 @@ public function admin_notices() {
if (isset($_GET['page']) && 'paypal-for-woocommerce' === $_GET['page']) {
return;
}
if (class_exists('Paypal_For_Woocommerce_Multi_Account_Management')) {
return;
}
$notice_data['classic_upgrade'] = array(
'id' => 'ppcp_notice_classic_upgrade',
'ans_company_logo' => PAYPAL_FOR_WOOCOMMERCE_ASSET_URL . 'ppcp-gateway/images/admin/angelleye-icon.jpg',
Expand Down
54 changes: 25 additions & 29 deletions ppcp-gateway/class-angelleye-paypal-ppcp-admin-onboarding.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,42 +327,38 @@ public function display_view() {
}
}
$this->angelleye_ppcp_load_variable();

if (class_exists('Paypal_For_Woocommerce_Multi_Account_Management')) {
$this->view();
} else {
$angelleye_classic_gateway_id_list = array('paypal_express', 'paypal_pro', 'paypal_pro_payflow', 'paypal_advanced', 'paypal_credit_card_rest', 'paypal', 'ppec_paypal');
$active_classic_gateway_list = array();
foreach (WC()->payment_gateways->get_available_payment_gateways() as $gateway) {
if (in_array($gateway->id, $angelleye_classic_gateway_id_list) && 'yes' === $gateway->enabled && $gateway->is_available() === true) {
$active_classic_gateway_list[$gateway->id] = $gateway->id;
}
$angelleye_classic_gateway_id_list = array('paypal_express', 'paypal_pro', 'paypal_pro_payflow', 'paypal_advanced', 'paypal_credit_card_rest', 'paypal', 'ppec_paypal');
$active_classic_gateway_list = array();
foreach (WC()->payment_gateways->get_available_payment_gateways() as $gateway) {
if (in_array($gateway->id, $angelleye_classic_gateway_id_list) && 'yes' === $gateway->enabled && $gateway->is_available() === true) {
$active_classic_gateway_list[$gateway->id] = $gateway->id;
}
$other_payment_methods = $this->angelleye_ppcp_get_other_payment_methods();
if (!empty($other_payment_methods)) {
foreach ($other_payment_methods as $gateway_id) {
if (in_array($gateway_id, array('paypal', 'ppec_paypal'))) {
//$active_classic_gateway_list[$gateway_id] = $gateway_id;
}
}
$other_payment_methods = $this->angelleye_ppcp_get_other_payment_methods();
if (!empty($other_payment_methods)) {
foreach ($other_payment_methods as $gateway_id) {
if (in_array($gateway_id, array('paypal', 'ppec_paypal'))) {
//$active_classic_gateway_list[$gateway_id] = $gateway_id;
}
}
if (count($active_classic_gateway_list) > 0) {
$paypal_vault_supported_country = angelleye_ppcp_apple_google_vault_supported_country();
if (in_array($this->ppcp_paypal_country, $paypal_vault_supported_country) && $this->subscription_support_enabled) {
$this->migration_view($active_classic_gateway_list);
} elseif (!in_array($this->ppcp_paypal_country, $paypal_vault_supported_country) && $this->subscription_support_enabled) {
$this->view();
} elseif (in_array($this->ppcp_paypal_country, $paypal_vault_supported_country) && $this->subscription_support_enabled === false) {
$this->migration_view($active_classic_gateway_list);
} elseif (!in_array($this->ppcp_paypal_country, $paypal_vault_supported_country) && $this->subscription_support_enabled === false) {
$this->migration_view($active_classic_gateway_list);
} else {
$this->view();
}
}
if (count($active_classic_gateway_list) > 0) {
$paypal_vault_supported_country = angelleye_ppcp_apple_google_vault_supported_country();
if (in_array($this->ppcp_paypal_country, $paypal_vault_supported_country) && $this->subscription_support_enabled) {
$this->migration_view($active_classic_gateway_list);
} elseif (!in_array($this->ppcp_paypal_country, $paypal_vault_supported_country) && $this->subscription_support_enabled) {
$this->view();
} elseif (in_array($this->ppcp_paypal_country, $paypal_vault_supported_country) && $this->subscription_support_enabled === false) {
$this->migration_view($active_classic_gateway_list);
} elseif (!in_array($this->ppcp_paypal_country, $paypal_vault_supported_country) && $this->subscription_support_enabled === false) {
$this->migration_view($active_classic_gateway_list);
} else {
$this->view();
}
} else {
$this->view();
}

} catch (Exception $ex) {

}
Expand Down
1 change: 1 addition & 0 deletions template/migration/ppcp_paypal_advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<li><?php echo __('Direct Credit Cards (No Login Required!)', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Credit Card Fees Reduced to 2.69%!', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Pro No Longer Required – No Monthly Fees!', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Full Support for Multi-Account Functionality', 'paypal-for-woocommerce'); ?></li>
</ul>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions template/migration/ppcp_paypal_credit_card_rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<li><?php echo __('Direct Credit Cards (No Login Required!)', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Credit Card Fees Reduced to 2.69%!', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Pro No Longer Required – No Monthly Fees!', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Full Support for Multi-Account Functionality', 'paypal-for-woocommerce'); ?></li>
</ul>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions template/migration/ppcp_paypal_express.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<li><?php echo __('Direct Credit Cards (No Login Required!)', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Credit Card Fees Reduced to 2.69%!', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Pro No Longer Required – No Monthly Fees!', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Full Support for Multi-Account Functionality', 'paypal-for-woocommerce'); ?></li>
</ul>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<li><?php echo __('Direct Credit Cards (No Login Required!)', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Credit Card Fees Reduced to 2.69%!', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Pro No Longer Required – No Monthly Fees!', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Full Support for Multi-Account Functionality', 'paypal-for-woocommerce'); ?></li>
</ul>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions template/migration/ppcp_paypal_express_paypal_pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<li><?php echo __('Direct Credit Cards (No Login Required!)', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Credit Card Fees Reduced to 2.69%!', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Pro No Longer Required – No Monthly Fees!', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Full Support for Multi-Account Functionality', 'paypal-for-woocommerce'); ?></li>
</ul>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions template/migration/ppcp_paypal_pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<li><?php echo __('Direct Credit Cards (No Login Required!)', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Credit Card Fees Reduced to 2.69%!', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Pro No Longer Required – No Monthly Fees!', 'paypal-for-woocommerce'); ?></li>
<li><?php echo __('Full Support for Multi-Account Functionality', 'paypal-for-woocommerce'); ?></li>
</ul>
</div>
</div>
Expand Down

0 comments on commit b74867c

Please sign in to comment.