Automattic\WooCommerce\Internal\PushNotifications\Controllers
PushNotificationRestController::register_routes
Registers the send route.
Method of the class: PushNotificationRestController{}
No Hooks.
Returns
null. Nothing (null).
Usage
$PushNotificationRestController = new PushNotificationRestController(); $PushNotificationRestController->register_routes(): void;
Changelog
| Since 10.7.0 | Introduced. |
PushNotificationRestController::register_routes() PushNotificationRestController::register routes code WC 11.0.1
public function register_routes(): void {
register_rest_route(
self::ROUTE_NAMESPACE,
'send',
array(
'methods' => WP_REST_Server::CREATABLE,
'callback' => array( $this, 'create' ),
'permission_callback' => array( $this, 'authorize' ),
)
);
}