WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\Domain\Services

ExtendRestApi::register_payment_requirements() public WC 1.0

Registers and validates payment requirements callbacks.

{} It's a method of the class: ExtendRestApi{}

No Hooks.

Return

true|false. True on success.

Usage

$ExtendRestApi = new ExtendRestApi();
$ExtendRestApi->register_payment_requirements( $args );
$args(array) (required)

Array of registration data.

  • data_callback(callable)
    Callback executed to add payment requirements data.

Code of ExtendRestApi::register_payment_requirements() WC 5.7.1

public function register_payment_requirements( $args ) {
	if ( ! is_callable( $args['data_callback'] ) ) {
		$this->throw_exception( '$data_callback must be a callable function.' );
	}

	$this->payment_requirements[] = $args['data_callback'];

	return true;
}