AJAX.php
4 months ago
AJAX_Manager.php
2 weeks ago
Archive_Link.php
4 months ago
Clear_Favorite_Report.php
2 weeks ago
Click_Tracking_Cache_Cleared.php
4 months ago
Configure_Pruner.php
4 months ago
Copy_Report.php
4 months ago
Create_Campaign.php
2 years ago
Create_Report.php
4 months ago
Delete_Campaign.php
2 years ago
Delete_Data.php
4 months ago
Delete_Link.php
4 months ago
Delete_Module.php
4 months ago
Delete_Report.php
4 months ago
Dismiss_Notice.php
1 year ago
Edit_Link.php
4 months ago
Edit_Module.php
4 months ago
Export_Report_Statistics.php
2 months ago
Export_Report_Table.php
9 months ago
Export_Reports.php
4 days ago
FetchRealTimeData.php
2 weeks ago
Filter.php
2 months ago
Get_Journey_Timeline.php
6 months ago
Get_Markup_For_Module.php
1 year ago
Get_Markup_For_Modules.php
4 months ago
Import_Reports.php
4 months ago
Migration_Status.php
4 months ago
Pause_Email_Reports.php
4 months ago
Preview_Email.php
2 months ago
Refresh_Modules.php
4 months ago
Rename_Report.php
4 months ago
Reorder_Modules.php
4 months ago
Reset_Analytics.php
4 months ago
Reset_Overview.php
4 months ago
SaveRealTimePreferences.php
4 days ago
Save_Module.php
4 months ago
Save_Report.php
4 months ago
Set_Favorite_Report.php
1 year ago
Set_WooCommerce_Statuses_To_Track.php
4 months ago
Sort_Links.php
4 months ago
Sort_Reports.php
4 months ago
Test_Email.php
2 months ago
Update_Capabilities.php
4 months ago
Update_User_Settings.php
4 months ago
Pause_Email_Reports.php
32 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP\AJAX; |
| 4 | |
| 5 | /** @internal */ |
| 6 | class Pause_Email_Reports extends \IAWP\AJAX\AJAX |
| 7 | { |
| 8 | /** |
| 9 | * @return string |
| 10 | */ |
| 11 | protected function action_name() : string |
| 12 | { |
| 13 | return 'iawp_pause_email_reports'; |
| 14 | } |
| 15 | /** |
| 16 | * @return void |
| 17 | */ |
| 18 | protected function requires_write_access() : bool |
| 19 | { |
| 20 | return \true; |
| 21 | } |
| 22 | protected function action_callback() : void |
| 23 | { |
| 24 | $paused = $this->get_boolean_field('paused') === \true; |
| 25 | if ($paused) { |
| 26 | \update_option('iawp_email_report_paused', '1', \true); |
| 27 | } else { |
| 28 | \update_option('iawp_email_report_paused', '0', \true); |
| 29 | } |
| 30 | } |
| 31 | } |
| 32 |