Automattic\WooCommerce\Internal\PushNotifications\Controllers
StepLogRestController::get_limit
The page size the request asked for, or the default.
Method of the class: StepLogRestController{}
No Hooks.
Returns
int.
Usage
// private - for code of main (parent) class only $result = $this->get_limit( $request ): int;
- $request(WP_REST_Request) (required)
- The request object.
StepLogRestController::get_limit() StepLogRestController::get limit code WC 11.3.0
private function get_limit( WP_REST_Request $request ): int {
$limit = (int) $request->get_param( 'limit' );
return $limit > 0 ? $limit : self::DEFAULT_LIMIT;
}