Skip to content

Commit

Permalink
Adding a fallback in case the maximum number of attempts is going to …
Browse files Browse the repository at this point in the history
…be changed in the future without paying attention to set a proper time frame for it.
  • Loading branch information
message-dimke committed Oct 23, 2024
1 parent aff1673 commit 2610208
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CommerceIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static function handle_create( $attempt = 0 ): array {
);
$frames = array( MINUTE_IN_SECONDS, HOUR_IN_SECONDS, DAY_IN_SECONDS );
as_schedule_single_action(
time() + $frames[ $attempt ],
time() + ( $frames[ $attempt ] ?? DAY_IN_SECONDS ),
'pinterest-for-woocommerce-create-commerce-integration-retry',
array(
'attempt' => $attempt + 1,
Expand Down

0 comments on commit 2610208

Please sign in to comment.