Automattic\WooCommerce\Admin\API

MobileAppQRLogin::check_generation_rate_limitprivateWC 1.0

Check rate limit for token generation.

Method of the class: MobileAppQRLogin{}

No Hooks.

Returns

true|false. True if within rate limit.

Usage

// private - for code of main (parent) class only
$result = $this->check_generation_rate_limit( $user_id );
$user_id(int) (required)
The user ID.

MobileAppQRLogin::check_generation_rate_limit() code WC 11.0.1

private function check_generation_rate_limit( $user_id ) {
	return QRLoginRateLimits::consume( QRLoginRateLimits::BUCKET_GENERATION, (string) $user_id );
}