Automattic\WooCommerce\StoreApi\Utilities
RateLimits::is_exceeded_retry_after()
If exceeded, seconds until reset.
Method of the class: RateLimits{}
No Hooks.
Return
true|false|Int
.
Usage
$result = RateLimits::is_exceeded_retry_after( $action_id );
- $action_id(string) (required)
- Identifier of the action.
RateLimits::is_exceeded_retry_after() RateLimits::is exceeded retry after code WC 7.7.0
public static function is_exceeded_retry_after( $action_id ) { $current_limit = self::get_rate_limit( $action_id ); // Before the next run is allowed, retry forbidden. if ( time() <= $current_limit->reset && 0 === $current_limit->remaining ) { return (int) $current_limit->reset - time(); } // After the next run is allowed, retry allowed. return false; }