Skip to content

Commit

Permalink
Check if we have an order ID
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamadNateqi committed Apr 12, 2024
1 parent bcccb26 commit f9cbcca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion includes/class-wcpdf-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,12 @@ public function handle_heartbeat_received( array $response, array $data ): array
return $response;
}

$order_id = $data['wc-refresh-order-lock'] ?? $data['wp-refresh-post-lock']['post_id'];
$order_id = $data['wc-refresh-order-lock'] ?? $data['wp-refresh-post-lock']['post_id'];

if ( empty( $order_id ) ) {
return $response;
}

$pending_documents = $data['wpo_wcpdf_pending_documents'];

foreach ( $pending_documents as $document_type ) {
Expand Down

0 comments on commit f9cbcca

Please sign in to comment.