/** * Get the order note message when a customer saves their payment method * to their account * * @since 4.1.2 * @param \SV_WC_Payment_Gateway_Payment_Token $token the payment token being saved * @return string */ protected function get_saved_payment_token_order_note($token) { $message = ''; // order note based on gateway type if ($this->is_credit_card_gateway()) { /* translators: Placeholders: %1$s - payment gateway title (such as Authorize.net, Braintree, etc), %2$s - payment method name (mastercard, bank account, etc), %3$s - last four digits of the card/account, %4$s - card/account expiry date */ $message = sprintf(__('%1$s Payment Method Saved: %2$s ending in %3$s (expires %4$s)', 'woocommerce-plugin-framework'), $this->get_method_title(), $token->get_type_full(), $token->get_last_four(), $token->get_exp_date()); } elseif ($this->is_echeck_gateway()) { // account type (checking/savings) may or may not be available, which is fine /* translators: Placeholders: %1$s - payment gateway title (such as CyberSouce, NETbilling, etc), %2$s - account type (checking/savings - may or may not be available), %3$s - last four digits of the account */ $message = sprintf(__('%1$s eCheck Payment Method Saved: %2$s account ending in %3$s', 'woocommerce-plugin-framework'), $this->get_method_title(), $token->get_account_type(), $token->get_last_four()); } return $message; }