Automattic\WooCommerce\Admin\API\AI
Patterns::register_routes()
Register routes.
Method of the class: Patterns{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Patterns = new Patterns(); $Patterns->register_routes();
Patterns::register_routes() Patterns::register routes code WC 9.7.1
public function register_routes() { $this->register( array( array( 'methods' => \WP_REST_Server::CREATABLE, 'callback' => array( $this, 'update_patterns' ), 'permission_callback' => array( Middleware::class, 'is_authorized' ), 'args' => array( 'business_description' => array( 'description' => __( 'The business description for a given store.', 'woocommerce' ), 'type' => 'string', ), 'images' => array( 'description' => __( 'The images for a given store.', 'woocommerce' ), 'type' => 'object', ), ), ), array( 'methods' => \WP_REST_Server::DELETABLE, 'callback' => array( $this, 'delete_patterns' ), 'permission_callback' => array( Middleware::class, 'is_authorized' ), ), ) ); }