Automattic\WooCommerce\Blocks\Payments

Api::register_payment_method_integrations()publicWC 1.0

Register payment method integrations bundled with blocks.

{} Это метод класса: Api{}

Хуков нет.

Возвращает

null. Ничего.

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

$Api = new Api();
$Api->register_payment_method_integrations( $payment_method_registry );
$payment_method_registry(PaymentMethodRegistry) (обязательный)
Payment method registry instance.

Код Api::register_payment_method_integrations() WC 6.4.1

public function register_payment_method_integrations( PaymentMethodRegistry $payment_method_registry ) {
	$payment_method_registry->register(
		Package::container()->get( Cheque::class )
	);
	$payment_method_registry->register(
		Package::container()->get( PayPal::class )
	);
	$payment_method_registry->register(
		Package::container()->get( BankTransfer::class )
	);
	$payment_method_registry->register(
		Package::container()->get( CashOnDelivery::class )
	);
}