woocommerce_checkout_payment()WC 1.0

Output the Payment Methods on the checkout.

Хуки из функции

Возвращает

null. Ничего (null).

Использование

woocommerce_checkout_payment();

Код woocommerce_checkout_payment() WC 8.7.0

function woocommerce_checkout_payment() {
	if ( WC()->cart->needs_payment() ) {
		$available_gateways = WC()->payment_gateways()->get_available_payment_gateways();
		WC()->payment_gateways()->set_current_gateway( $available_gateways );
	} else {
		$available_gateways = array();
	}

	wc_get_template(
		'checkout/payment.php',
		array(
			'checkout'           => WC()->checkout(),
			'available_gateways' => $available_gateways,
			'order_button_text'  => apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) ),
		)
	);
}