Automattic\WooCommerce\Admin\API

ShippingPartnerSuggestions::register_routes()publicWC 1.0

Register routes.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

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

Код ShippingPartnerSuggestions::register_routes() WC 8.7.0

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' ),
				'args'                => array(
					'force_default_suggestions' => array(
						'type'        => 'boolean',
						'description' => __( 'Return the default shipping partner suggestions when woocommerce_show_marketplace_suggestions option is set to no', 'woocommerce' ),
					),
				),
			),
			'schema' => array( $this, 'get_suggestions_schema' ),
		)
	);

}