woocommerce_store_api_register_payment_requirements()WC 1.0

Registers and validates payment requirements callbacks.

Хуков нет.

Возвращает

null. Ничего.

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

woocommerce_store_api_register_payment_requirements( $args );
$args(массив) (обязательный)
Args to pass to register_payment_requirements.

Заметки

  • Смотрите: Automattic\WooCommerce\StoreApi\Schemas[ExtendSchema::register_payment_requirements()](/plugin/woocommerce/function/ExtendSchema::register_payment_requirements)

Код woocommerce_store_api_register_payment_requirements() WC 6.7.0

function woocommerce_store_api_register_payment_requirements( $args ) {
	try {
		$extend = StoreApi::container()->get( ExtendSchema::class );
		$extend->register_payment_requirements( $args );
	} catch ( \Exception $error ) {
		return new \WP_Error( 'error', $error->getMessage() );
	}
	return true;
}