| @@ 654-664 (lines=11) @@ | ||
| 651 | $response = $queue->close( $buffer, $request_body['item_ids'] ); |
|
| 652 | ||
| 653 | // Perform another checkout? |
|
| 654 | if ( isset( $request_body['continue'] ) && $request_body['continue'] ) { |
|
| 655 | if ( in_array( $queue_name, array( 'full_sync', 'immediate' ), true ) ) { |
|
| 656 | // Send Full Sync Actions. |
|
| 657 | Sender::get_instance()->do_full_sync(); |
|
| 658 | } else { |
|
| 659 | // Send Incremental Sync Actions. |
|
| 660 | if ( $queue->has_any_items() ) { |
|
| 661 | Sender::get_instance()->do_sync(); |
|
| 662 | } |
|
| 663 | } |
|
| 664 | } |
|
| 665 | ||
| 666 | if ( is_wp_error( $response ) ) { |
|
| 667 | return $response; |
|
| @@ 399-409 (lines=11) @@ | ||
| 396 | $response = $queue->close( $buffer, $request_body['item_ids'] ); |
|
| 397 | ||
| 398 | // Perform another checkout? |
|
| 399 | if ( isset( $request_body['continue'] ) && $request_body['continue'] ) { |
|
| 400 | if ( in_array( $queue_name, array( 'full_sync', 'immediate' ), true ) ) { |
|
| 401 | // Send Full Sync Actions. |
|
| 402 | Sender::get_instance()->do_full_sync(); |
|
| 403 | } else { |
|
| 404 | // Send Incremental Sync Actions. |
|
| 405 | if ( $queue->has_any_items() ) { |
|
| 406 | Sender::get_instance()->do_sync(); |
|
| 407 | } |
|
| 408 | } |
|
| 409 | } |
|
| 410 | ||
| 411 | if ( is_wp_error( $response ) ) { |
|
| 412 | return $response; |
|