WC_Helper_Admin::register_rest_routes()public staticWC 1.0

Registers the REST routes for the featured products endpoint. This endpoint is used by the WooCommerce > Extensions > Discover page.

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

Хуков нет.

Возвращает

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

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

$result = WC_Helper_Admin::register_rest_routes();

Код WC_Helper_Admin::register_rest_routes() WC 9.4.2

public static function register_rest_routes() {
	register_rest_route(
		'wc/v3',
		'/marketplace/featured',
		array(
			'methods'             => 'GET',
			'callback'            => array( __CLASS__, 'get_featured' ),
			'permission_callback' => array( __CLASS__, 'get_permission' ),
		)
	);
}