Automattic\WooCommerce\Blocks\Payments

Api::register_payment_method_integrations()publicWC 1.0

Register payment method integrations bundled with blocks.

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

Хуков нет.

Возвращает

null. Ничего (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 8.7.0

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 )
	);
}