Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog
ApiController::register_routes
Register the routes for the API controller.
Method of the class: ApiController{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ApiController = new ApiController(); $ApiController->register_routes(): void;
ApiController::register_routes() ApiController::register routes code WC 10.8.1
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,
),
),
)
);
}