Skip to content

Commit 5a4fb44

Browse files
dparker1005claude
andcommitted
Show 'Not Supported' tag for deprecated gateways enabled via Add On
Previously the deprecation status only showed when a deprecated gateway was the primary gateway. Now it also appends a 'Not Supported' tag when a deprecated gateway is enabled as a secondary gateway, e.g. via the Add PayPal Express Add On. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 19c686a commit 5a4fb44

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

adminpages/paymentsettings.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,13 @@
228228
}
229229

230230
// Special case for deprecated gateways.
231-
if ( in_array( $gateway_slug, $deprecated_gateways, true ) && $gateway_slug === pmpro_getOption( 'gateway' ) ) {
232-
$gateway_status_html = '<span class="pmpro_tag pmpro_tag-has_icon pmpro_tag-error">' . esc_html__( 'Enabled (Not Supported)', 'paid-memberships-pro' ) . '</span>';
231+
if ( in_array( $gateway_slug, $deprecated_gateways, true ) ) {
232+
if ( pmpro_getOption( 'gateway' ) === $gateway_slug ) {
233+
$gateway_status_html = '<span class="pmpro_tag pmpro_tag-has_icon pmpro_tag-error">' . esc_html__( 'Enabled (Not Supported)', 'paid-memberships-pro' ) . '</span>';
234+
} elseif ( $gateway_status_html !== esc_html__( '&#8212;', 'paid-memberships-pro' ) ) {
235+
// Gateway is enabled (e.g. via Add PayPal Express Add On) but deprecated.
236+
$gateway_status_html .= ' <span class="pmpro_tag pmpro_tag-has_icon pmpro_tag-error">' . esc_html__( 'Not Supported', 'paid-memberships-pro' ) . '</span>';
237+
}
233238
}
234239

235240
echo wp_kses_post( $gateway_status_html );

0 commit comments

Comments
 (0)