Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog
ApiController::register_routes
Register the routes for the API controller.
Метод класса: ApiController{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$ApiController = new ApiController(); $ApiController->register_routes(): void;
Код ApiController::register_routes() ApiController::register routes WC 10.5.2
public function register_routes(): void {
register_rest_route(
self::ROUTE_NAMESPACE,
'/create',
array(
'methods' => 'POST',
'callback' => array( $this, 'generate_feed' ),
'permission_callback' => array( $this, 'is_authorized' ),
'args' => array(
'force' => array(
'type' => 'boolean',
'default' => false,
'description' => 'Force regeneration of the feed. NOOP if generation is in progress.',
),
'_product_fields' => array(
'type' => 'string',
'description' => 'Comma-separated list of fields to include for non-variable products.',
'required' => false,
),
'_variation_fields' => array(
'type' => 'string',
'description' => 'Comma-separated list of fields to include for variations.',
'required' => false,
),
),
)
);
}