Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore incorrect change where a push could be sent synchronously #1186

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions admin/apple-actions/index/class-push.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function __construct( $settings, $id ) {
* @param boolean $doing_async Optional. Whether the action is being performed asynchronously.
* @param int $user_id Optional. The ID of the user performing the action. Defaults to the current user ID.
*
* @return boolean
* @return false|null
* @throws Action_Exception If the push fails.
*/
public function perform( $doing_async = false, $user_id = null ) {
Expand All @@ -95,9 +95,9 @@ public function perform( $doing_async = false, $user_id = null ) {
update_post_meta( $this->id, 'apple_news_api_pending', time() );

wp_schedule_single_event( time(), Admin_Apple_Async::ASYNC_PUSH_HOOK, [ $this->id, get_current_user_id() ] );
} else {
return $this->push( $user_id );
}

return $this->push( $user_id );
}

/**
Expand Down