Automattic\WooCommerce\Internal\PushNotifications\Controllers
StepLogRestController::get_notification
Handles the notification journey request.
Method of the class: StepLogRestController{}
No Hooks.
Returns
WP_REST_Response.
Usage
// protected - for code of main (parent) or child class $result = $this->get_notification( $request ): WP_REST_Response;
- $request(WP_REST_Request) (required)
- The request object.
Changelog
| Since 11.3.0 | Introduced. |
StepLogRestController::get_notification() StepLogRestController::get notification code WC 11.3.0
protected function get_notification( WP_REST_Request $request ): WP_REST_Response {
list( $from, $to ) = $this->get_range( $request );
return new WP_REST_Response(
$this->query->for_notification(
(string) $request->get_param( 'type' ),
(int) $request->get_param( 'resource_id' ),
$from,
$to,
$this->get_limit( $request )
)
);
}