WC_Helper_Orders_API::register_rest_routes()
Registers the REST routes for the Marketplace Orders API. These endpoints are used by the Marketplace Subscriptions React UI.
Метод класса: WC_Helper_Orders_API{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$result = WC_Helper_Orders_API::register_rest_routes();
Код WC_Helper_Orders_API::register_rest_routes() WC Helper Orders API::register rest routes WC 9.4.2
public static function register_rest_routes() { register_rest_route( 'wc/v3', '/marketplace/create-order', array( 'methods' => 'POST', 'callback' => array( __CLASS__, 'create_order' ), 'permission_callback' => array( __CLASS__, 'get_permission' ), 'args' => array( 'product_id' => array( 'required' => true, 'validate_callback' => function( $argument ) { return is_int( $argument ); }, ), ), ) ); }