Skip payment welcome screen for wc pay banner experiment
This commit is contained in:
parent
b524b82816
commit
d4af17d3a3
|
@ -189,8 +189,16 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
|
||||||
/* Translators: %s Payment gateway name. */
|
/* Translators: %s Payment gateway name. */
|
||||||
echo '<a class="button alignright" aria-label="' . esc_attr( sprintf( __( 'Manage the "%s" payment method', 'woocommerce' ), $method_title ) ) . '" href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=' . strtolower( $gateway->id ) ) ) . '">' . esc_html__( 'Manage', 'woocommerce' ) . '</a>';
|
echo '<a class="button alignright" aria-label="' . esc_attr( sprintf( __( 'Manage the "%s" payment method', 'woocommerce' ), $method_title ) ) . '" href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=' . strtolower( $gateway->id ) ) ) . '">' . esc_html__( 'Manage', 'woocommerce' ) . '</a>';
|
||||||
} else {
|
} else {
|
||||||
|
if (
|
||||||
|
'WooCommerce Payments' === $method_title &&
|
||||||
|
class_exists( 'WC_Payments_Account' )
|
||||||
|
) {
|
||||||
|
$setup_url = WC_Payments_Account::get_connect_url();
|
||||||
|
} else {
|
||||||
|
$setup_url = admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=' . strtolower( $gateway->id ) );
|
||||||
|
}
|
||||||
/* Translators: %s Payment gateway name. */
|
/* Translators: %s Payment gateway name. */
|
||||||
echo '<a class="button alignright" aria-label="' . esc_attr( sprintf( __( 'Set up the "%s" payment method', 'woocommerce' ), $method_title ) ) . '" href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout§ion=' . strtolower( $gateway->id ) ) ) . '">' . esc_html__( 'Set up', 'woocommerce' ) . '</a>';
|
echo '<a class="button alignright" aria-label="' . esc_attr( sprintf( __( 'Set up the "%s" payment method', 'woocommerce' ), $method_title ) ) . '" href="' . esc_url( $setup_url ) . '">' . esc_html__( 'Set up', 'woocommerce' ) . '</a>';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'status':
|
case 'status':
|
||||||
|
|
Loading…
Reference in New Issue