WC_Payment_Gateway::payment_fieldspublicWC 1.5.7

Default payment fields display. Override this in your gateway to customize displayed fields.

By default this renders the payment gateway description.

Method of the class: WC_Payment_Gateway{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

Changelog

Since 1.5.7 Introduced.

WC_Payment_Gateway::payment_fields() code WC 9.9.4

public function payment_fields() {
	$description = $this->get_description();

	if ( $description ) {
		// KSES is ran within get_description, but not here since there may be custom HTML returned by extensions.
		echo wpautop( wptexturize( $description ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	}

	if ( $this->supports( 'default_credit_card_form' ) ) {
		$this->credit_card_form(); // Deprecated, will be removed in a future version.
	}
}