WC_REST_WCCOM_Site_Installer_Controller::register_routes()
Register the routes for plugin auto-installer.
Метод класса: WC_REST_WCCOM_Site_Installer_Controller{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WC_REST_WCCOM_Site_Installer_Controller = new WC_REST_WCCOM_Site_Installer_Controller(); $WC_REST_WCCOM_Site_Installer_Controller->register_routes();
Список изменений
С версии 7.7.0 | Введена. |
Код WC_REST_WCCOM_Site_Installer_Controller::register_routes() WC REST WCCOM Site Installer Controller::register routes WC 9.8.1
woocommerce/includes/wccom-site/rest-api/endpoints/class-wc-rest-wccom-site-installer-controller.php
public function register_routes() { register_rest_route( $this->namespace, '/' . $this->rest_base, array( array( 'methods' => WP_REST_Server::EDITABLE, 'callback' => array( $this, 'install' ), 'permission_callback' => array( $this, 'check_permission' ), 'args' => array( 'product-id' => array( 'required' => true, 'type' => 'integer', ), 'run-until-step' => array( 'required' => true, 'type' => 'string', 'enum' => WC_WCCOM_Site_Installation_Manager::STEPS, ), 'idempotency-key' => array( 'required' => true, 'type' => 'string', ), ), ), ) ); register_rest_route( $this->namespace, '/' . $this->rest_base . '/reset', array( array( 'methods' => WP_REST_Server::EDITABLE, 'callback' => array( $this, 'reset_install' ), 'permission_callback' => array( $this, 'check_permission' ), 'args' => array( 'product-id' => array( 'required' => true, 'type' => 'integer', ), 'idempotency-key' => array( 'required' => true, 'type' => 'string', ), ), ), ) ); }