From 847e4859f8ae52fd98ae4c77ad3fb3e082e710e2 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 7 Aug 2017 12:38:50 +0100 Subject: [PATCH] Include add_payment_method in gateway abstract --- includes/abstracts/abstract-wc-payment-gateway.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/includes/abstracts/abstract-wc-payment-gateway.php b/includes/abstracts/abstract-wc-payment-gateway.php index a6dc88c9ad8..d92134efe5c 100644 --- a/includes/abstracts/abstract-wc-payment-gateway.php +++ b/includes/abstracts/abstract-wc-payment-gateway.php @@ -456,4 +456,17 @@ abstract class WC_Payment_Gateway extends WC_Settings_API { esc_html__( 'Save to account', 'woocommerce' ) ); } + + /** + * Add payment method via account screen. This should be extended by gateway plugins. + * + * @since 3.2.0 Included here from 3.2.0, but supported from 3.0.0. + * @return array + */ + public function add_payment_method() { + return array( + 'result' => 'failure', + 'redirect' => wc_get_endpoint_url( 'payment-methods' ), + ); + } }