| 1 |
<?php |
| 2 |
/** |
| 3 |
* Setup Wizard summary-email checkpoint contract. |
| 4 |
* |
| 5 |
* @package Booking Calendar |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
exit; |
| 10 |
} |
| 11 |
|
| 12 |
/** |
| 13 |
* Define the narrow checkpoint operations required by the Review email sender. |
| 14 |
* |
| 15 |
* The sender owns email composition and delivery while the checkpoint store |
| 16 |
* remains the only component that knows how user-, site-, and owner-scoped |
| 17 |
* wizard metadata is persisted. |
| 18 |
*/ |
| 19 |
interface WPBC_Setup_Wizard_Email_State_Store { |
| 20 |
|
| 21 |
/** |
| 22 |
* Load the current normalized Setup Wizard checkpoint. |
| 23 |
* |
| 24 |
* @return array<string,mixed> Normalized checkpoint. |
| 25 |
*/ |
| 26 |
public function load(); |
| 27 |
|
| 28 |
/** |
| 29 |
* Return the opaque site-, user-, and owner-scoped lock identifier. |
| 30 |
* |
| 31 |
* @return string Context-specific lock scope. |
| 32 |
*/ |
| 33 |
public function get_lock_scope(); |
| 34 |
|
| 35 |
/** |
| 36 |
* Persist normalized summary-email state against an expected revision. |
| 37 |
* |
| 38 |
* @param array<string,mixed> $email_state New summary-email metadata. |
| 39 |
* @param int $expected_revision Checkpoint revision observed by the sender. |
| 40 |
* |
| 41 |
* @return array<string,mixed>|WP_Error Updated checkpoint or a stale/storage error. |
| 42 |
*/ |
| 43 |
public function update_email_state( array $email_state, $expected_revision ); |
| 44 |
} |
| 45 |
|