WordPress at Your Fingertips
function is not described

WC_Payment_Gateway::save_payment_method_checkbox() public WC 2.6.0

Outputs a checkbox for saving a new payment method to the database.

{} It's a method of the class: WC_Payment_Gateway{}

Return

null. Nothing.

Usage

$WC_Payment_Gateway = new WC_Payment_Gateway();
$WC_Payment_Gateway->save_payment_method_checkbox();

Changelog

Since 2.6.0 Introduced.

Code of WC_Payment_Gateway::save_payment_method_checkbox() WC 5.5.2

<?php
public function save_payment_method_checkbox() {
	$html = sprintf(
		'<p class="form-row woocommerce-SavedPaymentMethods-saveNew">
			<input id="wc-%1$s-new-payment-method" name="wc-%1$s-new-payment-method" type="checkbox" value="true" style="width:auto;" />
			<label for="wc-%1$s-new-payment-method" style="display:inline;">%2$s</label>
		</p>',
		esc_attr( $this->id ),
		esc_html__( 'Save to account', 'woocommerce' )
	);

	echo apply_filters( 'woocommerce_payment_gateway_save_new_payment_method_option_html', $html, $this ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}