Automattic\WooCommerce\Admin\API
LaunchYourStore::register_routes()
Register routes.
Method of the class: LaunchYourStore{}
No Hooks.
Return
null
. Nothing (null).
Usage
$LaunchYourStore = new LaunchYourStore(); $LaunchYourStore->register_routes();
LaunchYourStore::register_routes() LaunchYourStore::register routes code WC 9.6.1
public function register_routes() { register_rest_route( $this->namespace, '/' . $this->rest_base . '/initialize-coming-soon', array( array( 'methods' => 'POST', 'callback' => array( $this, 'initialize_coming_soon' ), 'permission_callback' => array( $this, 'must_be_shop_manager_or_admin' ), ), ) ); register_rest_route( $this->namespace, '/' . $this->rest_base . '/update-survey-status', array( array( 'methods' => 'POST', 'callback' => array( $this, 'update_survey_status' ), 'permission_callback' => array( $this, 'must_be_shop_manager_or_admin' ), 'args' => array( 'status' => array( 'type' => 'string', 'enum' => array( 'yes', 'no' ), ), ), ), ) ); register_rest_route( $this->namespace, '/' . $this->rest_base . '/survey-completed', array( array( 'methods' => 'GET', 'callback' => array( $this, 'has_survey_completed' ), 'permission_callback' => array( $this, 'must_be_shop_manager_or_admin' ), ), ) ); register_rest_route( $this->namespace, '/' . $this->rest_base . '/woopayments/test-orders/count', array( array( 'methods' => 'GET', 'callback' => array( $this, 'get_woopay_test_orders_count' ), 'permission_callback' => array( $this, 'must_be_shop_manager_or_admin' ), ), ) ); register_rest_route( $this->namespace, '/' . $this->rest_base . '/woopayments/test-orders', array( array( 'methods' => 'DELETE', 'callback' => array( $this, 'delete_woopay_test_orders' ), 'permission_callback' => array( $this, 'must_be_shop_manager_or_admin' ), ), ) ); }