Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marking PayFlow, PayPal Standard, and Braintree as deprecated #3184

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion includes/deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,7 @@ function pmpro_deprecated_add_ons_action_links( $actions, $plugin_file ) {
* Cybersource was deprecated in 2.10.
* PayPal Website Payments Pro was deprecated in 2.10.
* Authorize.net was deprecated in 3.2.
* PayFlow, PayPal Standard, and Braintree were deprecated in TBD.
*
* This code will add it back those gateways if it was the selected gateway.
* In future versions, we will remove gateway code entirely.
Expand All @@ -1028,7 +1029,7 @@ function pmpro_check_for_deprecated_gateways() {
}
$default_gateway = get_option( 'pmpro_gateway' );

$deprecated_gateways = array( 'twocheckout', 'cybersource', 'paypal', 'authorizenet' );
$deprecated_gateways = array( 'twocheckout', 'cybersource', 'paypal', 'authorizenet', 'payflow', 'paypalstandard', 'braintree' );
foreach ( $deprecated_gateways as $deprecated_gateway ) {
if ( $default_gateway === $deprecated_gateway || in_array( $deprecated_gateway, $undeprecated_gateways ) ) {
require_once( PMPRO_DIR . '/classes/gateways/class.pmprogateway_' . $deprecated_gateway . '.php' );
Expand Down
10 changes: 0 additions & 10 deletions paid-memberships-pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,10 @@
// load gateway
require_once( PMPRO_DIR . '/classes/gateways/class.pmprogateway.php' ); // loaded by memberorder class when needed

// load payment gateway class
if ( version_compare( PHP_VERSION, '5.4.45', '>=' ) ) {
require_once( PMPRO_DIR . '/classes/gateways/class.pmprogateway_braintree.php' );
}

require_once( PMPRO_DIR . '/classes/class-pmpro-discount-codes.php' ); // loaded by memberorder class when needed

require_once( PMPRO_DIR . '/classes/gateways/class.pmprogateway_check.php' );
require_once( PMPRO_DIR . '/classes/gateways/class.pmprogateway_payflowpro.php' );
require_once( PMPRO_DIR . '/classes/gateways/class.pmprogateway_paypalexpress.php' );
require_once( PMPRO_DIR . '/classes/gateways/class.pmprogateway_paypalstandard.php' );

pmpro_check_for_deprecated_gateways();

Expand Down Expand Up @@ -189,9 +182,6 @@ function pmpro_gateways() {
'check' => __( 'Pay by Check', 'paid-memberships-pro' ),
'stripe' => __( 'Stripe', 'paid-memberships-pro' ),
'paypalexpress' => __( 'PayPal Express', 'paid-memberships-pro' ),
'payflowpro' => __( 'PayPal Payflow Pro/PayPal Pro', 'paid-memberships-pro' ),
'paypalstandard' => __( 'PayPal Standard', 'paid-memberships-pro' ),
'braintree' => __( 'Braintree Payments', 'paid-memberships-pro' ),
);

if ( pmpro_onlyFreeLevels() ) {
Expand Down