Automattic\WooCommerce\Admin\API

PaymentGatewaySuggestions::register_routes()publicWC 1.0

Register routes.

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

Хуков нет.

Возвращает

null. Ничего.

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

$PaymentGatewaySuggestions = new PaymentGatewaySuggestions();
$PaymentGatewaySuggestions->register_routes();

Код PaymentGatewaySuggestions::register_routes() WC 6.6.1

public function register_routes() {

	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base,
		array(
			array(
				'methods'             => \WP_REST_Server::READABLE,
				'callback'            => array( $this, 'get_suggestions' ),
				'permission_callback' => array( $this, 'get_permission_check' ),
			),
			'schema' => array( $this, 'get_item_schema' ),
		)
	);

	register_rest_route(
		$this->namespace,
		'/' . $this->rest_base . '/dismiss',
		array(
			array(
				'methods'             => \WP_REST_Server::CREATABLE,
				'callback'            => array( $this, 'dismiss_payment_gateway_suggestion' ),
				'permission_callback' => array( $this, 'get_permission_check' ),
			),
			'schema' => array( $this, 'get_item_schema' ),
		)
	);

}