The Default (PHP) mailer is currently selected, but is not recommended because in most cases it does not resolve email delivery issues.
Please consider selecting and configuring one of the other mailers.
"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:312
+#: build/wp-mail-smtp-pro/src/Admin/PageAbstract.php:81
+#: src/Admin/Area.php:312
#: src/Admin/PageAbstract.php:81
msgid "Save Settings"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:313
+#: src/Admin/Area.php:313
+msgid "Cancel"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:314
+#: src/Admin/Area.php:314
+msgid "Warning icon"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:319
+#: src/Admin/Area.php:319
+msgid "%name% is a PRO Feature"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:320
+#: src/Admin/Area.php:320
+msgid "Upgrade to Pro"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:324
+#: src/Admin/Area.php:324
+msgid "Bonus: WP Mail SMTP users get $50 off regular price, applied at checkout."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:333
+#: src/Admin/Area.php:333
+msgid "Already purchased?"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:400
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:407
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:308
+#: src/Admin/Area.php:400
+#: src/Admin/Area.php:407
+#: src/Admin/Pages/About.php:308
+msgid "Activate"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:401
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:300
+#: src/Admin/Area.php:401
+#: src/Admin/Pages/About.php:300
+msgid "Activated"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:402
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:297
+#: src/Admin/Area.php:402
+#: src/Admin/Pages/About.php:297
+msgid "Active"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:403
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:305
+#: src/Admin/Area.php:403
+#: src/Admin/Pages/About.php:305
+msgid "Inactive"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:404
+#: src/Admin/Area.php:404
+msgid "Processing..."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:405
+#: src/Admin/Area.php:405
+msgid "Could not install a plugin. Please download from WordPress.org and install manually."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:406
+#: src/Admin/Area.php:406
+msgid "Install and Activate"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:408
+#: src/Admin/Area.php:408
+msgid "Download"
+msgstr ""
+
+#. translators: %1$s - WP.org link; %2$s - same WP.org link.
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:468
+#: src/Admin/Area.php:468
+msgid "Please rate WP Mail SMTP★★★★★ on WordPress.org to help us spread the word. Thank you from the WP Mail SMTP team!"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:805
+#: src/Admin/Area.php:805
+msgid "WP Mail SMTP Pro related message was successfully dismissed."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:824
+#: src/Admin/Area.php:824
+msgid "Educational notice for this mailer was successfully dismissed."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:863
+#: src/Admin/Area.php:863
+msgid "Go to WP Mail SMTP Settings page"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:870
+#: src/Admin/Area.php:870
+msgid "Go to WP Mail SMTP Lite vs Pro comparison page"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Area.php:871
+#: src/Admin/Area.php:871
+msgid "Premium Support"
+msgstr ""
+
#. translators: %s - plugin current license type.
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:98
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:526
#: src/Admin/Pages/About.php:98
#: src/Admin/Pages/About.php:526
msgid "%s vs Pro"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:170
#: src/Admin/Pages/About.php:170
msgid "Hello and welcome to WP Mail SMTP, the easiest and most popular WordPress SMTP plugin. We build software that helps your site reliably deliver emails every time."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:174
#: src/Admin/Pages/About.php:174
msgid "Email deliverability has been a well-documented problem for all WordPress websites. However as WPForms grew, we became more aware of this painful issue that affects our users and the larger WordPress community. So we decided to solve this problem and make a solution that's beginner friendly."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:177
#: src/Admin/Pages/About.php:177
msgid "Our goal is to make reliable email deliverability easy for WordPress."
msgstr ""
#. translators: %1$s - WPForms URL, %2$s - WPBeginner URL, %3$s - OptinMonster URL, %4$s - MonsterInsights URL, %5$s - RafflePress URL
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:184
#: src/Admin/Pages/About.php:184
msgid "WP Mail SMTP is brought to you by the same team that's behind the most user friendly WordPress forms, WPForms, the largest WordPress resource site, WPBeginner, the most popular lead-generation software, OptinMonster, the best WordPress analytics plugin, MonsterInsights, and the most powerful WordPress contest plugin, RafflePress."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:202
#: src/Admin/Pages/About.php:202
msgid "Yup, we know a thing or two about building awesome products that customers love."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:208
#: src/Admin/Pages/About.php:208
msgid "The WPForms Team photo"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:210
#: src/Admin/Pages/About.php:210
msgid "The WPForms Team"
msgstr ""
#. translators: %s - status HTML text.
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:250
#: src/Admin/Pages/About.php:250
msgid "Status: %s"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:316
#: src/Admin/Pages/About.php:316
msgid "Not Installed"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:319
#: src/Admin/Pages/About.php:319
msgid "Install Plugin"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:340
#: src/Admin/Pages/About.php:340
msgid "MonsterInsights"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:341
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:347
#: src/Admin/Pages/About.php:341
#: src/Admin/Pages/About.php:347
msgid "MonsterInsights makes it “effortless” to properly connect your WordPress site with Google Analytics, so you can start making data-driven decisions to grow your business."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:346
#: src/Admin/Pages/About.php:346
msgid "MonsterInsights Pro"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:354
#: src/Admin/Pages/About.php:354
msgid "OptinMonster"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:355
#: src/Admin/Pages/About.php:355
msgid "Our high-converting optin forms like Exit-Intent® popups, Fullscreen Welcome Mats, and Scroll boxes help you dramatically boost conversions and get more email subscribers."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:361
#: src/Admin/Pages/About.php:361
msgid "Contact Forms by WPForms"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:362
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:368
#: src/Admin/Pages/About.php:362
#: src/Admin/Pages/About.php:368
msgid "The best WordPress contact form plugin. Drag & Drop online form builder that helps you create beautiful contact forms with just a few clicks."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:367
#: src/Admin/Pages/About.php:367
msgid "WPForms Pro"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:375
#: src/Admin/Pages/About.php:375
msgid "RafflePress"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:376
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:382
#: src/Admin/Pages/About.php:376
#: src/Admin/Pages/About.php:382
msgid "Turn your visitors into brand ambassadors! Easily grow your email list, website traffic, and social media followers with powerful viral giveaways & contests."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:381
#: src/Admin/Pages/About.php:381
msgid "RafflePress Pro"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:401
#: src/Admin/Pages/About.php:401
msgid "Could not activate the plugin. Please activate it from the Plugins page."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:413
#: src/Admin/Pages/About.php:413
msgid "Plugin activated."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:430
#: src/Admin/Pages/About.php:430
msgid "Could not install the plugin."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:491
#: src/Admin/Pages/About.php:491
msgid "Plugin installed & activated."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:499
#: src/Admin/Pages/About.php:499
msgid "Plugin installed."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:534
#: src/Admin/Pages/About.php:534
msgid "Get the most out of WP Mail SMTP by upgrading to Pro and unlocking all of the powerful features."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:543
#: src/Admin/Pages/About.php:543
msgid "Feature"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:553
#: src/Admin/Pages/About.php:553
msgid "Pro"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:594
#: src/Admin/Pages/About.php:594
msgid "Get WP Mail SMTP Pro Today and Unlock all of these Powerful Features"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:601
#: src/Admin/Pages/About.php:601
msgid "Bonus: WP Mail SMTP Lite users get $50 off regular price, automatically applied at checkout."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:628
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:27
#: src/Admin/Pages/About.php:628
#: src/Admin/Pages/ControlTab.php:27
msgid "Email Controls"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:629
#: src/Admin/Pages/About.php:629
msgid "Additional Mailers"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:630
#: src/Admin/Pages/About.php:630
msgid "Customer Support"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:651
#: src/Admin/Pages/About.php:651
msgid "Emails are not logged"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:657
#: src/Admin/Pages/About.php:657
msgid "Complete Email Log management inside WordPress"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:665
#: src/Admin/Pages/About.php:665
msgid "No controls over whether default WordPress emails are sent"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:671
#: src/Admin/Pages/About.php:671
msgid "Complete Email Controls management for most default WordPress emails"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:679
#: src/Admin/Pages/About.php:679
msgid "Only default list of mailers"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:685
#: src/Admin/Pages/About.php:685
msgid "Additional mailers: Microsoft Outlook (with Office365 support) and Amazon SES"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:693
#: src/Admin/Pages/About.php:693
msgid "Limited Support"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/About.php:699
#: src/Admin/Pages/About.php:699
msgid "Priority Support"
msgstr ""
-#: src/Admin/Pages/ControlTab.php:46
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:48
+#: src/Admin/Pages/ControlTab.php:48
msgid "Comment Notifications"
msgstr ""
-#: src/Admin/Pages/ControlTab.php:47
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:49
+#: src/Admin/Pages/ControlTab.php:49
msgid "Manage emails sent when comments are published or awaiting moderation."
msgstr ""
-#: src/Admin/Pages/ControlTab.php:51
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:53
+#: src/Admin/Pages/ControlTab.php:53
msgid "Site Admin Email Change Notifications"
msgstr ""
-#: src/Admin/Pages/ControlTab.php:52
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:54
+#: src/Admin/Pages/ControlTab.php:54
msgid "Manage emails sent when site admin's account has been changed."
msgstr ""
-#: src/Admin/Pages/ControlTab.php:56
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:58
+#: src/Admin/Pages/ControlTab.php:58
msgid "User Change Notifications"
msgstr ""
-#: src/Admin/Pages/ControlTab.php:57
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:59
+#: src/Admin/Pages/ControlTab.php:59
msgid "Limit emails triggered by password changed/reset, email changed, and more."
msgstr ""
-#: src/Admin/Pages/ControlTab.php:61
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:63
+#: src/Admin/Pages/ControlTab.php:63
msgid "Personal Data Requests Notifications"
msgstr ""
-#: src/Admin/Pages/ControlTab.php:62
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:64
+#: src/Admin/Pages/ControlTab.php:64
msgid "Control emails for data requests and data removal actions."
msgstr ""
-#: src/Admin/Pages/ControlTab.php:66
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:68
+#: src/Admin/Pages/ControlTab.php:68
msgid "Automatic Update Notifications"
msgstr ""
-#: src/Admin/Pages/ControlTab.php:67
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:69
+#: src/Admin/Pages/ControlTab.php:69
msgid "Manage emails sent by the core automatic update process."
msgstr ""
-#: src/Admin/Pages/ControlTab.php:71
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:73
+#: src/Admin/Pages/ControlTab.php:73
msgid "New User Notifications"
msgstr ""
-#: src/Admin/Pages/ControlTab.php:72
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:74
+#: src/Admin/Pages/ControlTab.php:74
msgid "Toggle emails sent to both user and site administrator about new user accounts."
msgstr ""
-#: src/Admin/Pages/ControlTab.php:79
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:92
+#: src/Admin/Pages/ControlTab.php:92
msgid "Unlock Email Controls"
msgstr ""
-#: src/Admin/Pages/ControlTab.php:82
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:95
+#: src/Admin/Pages/ControlTab.php:95
msgid "Email Controls allows you to granularly manage emails sent by WordPress. "
msgstr ""
-#: src/Admin/Pages/ControlTab.php:106
-#: src/Admin/Pages/Logs.php:77
+#: build/wp-mail-smtp-pro/src/Admin/Pages/ControlTab.php:119
+#: build/wp-mail-smtp-pro/src/Admin/Pages/LogsTab.php:67
+#: src/Admin/Pages/ControlTab.php:119
+#: src/Admin/Pages/LogsTab.php:67
msgid "Upgrade to WP Mail SMTP Pro"
msgstr ""
-#: src/Admin/Pages/Logs.php:63
+#: build/wp-mail-smtp-pro/src/Admin/Pages/LogsTab.php:53
+#: src/Admin/Pages/LogsTab.php:53
msgid "Unlock Email Logging"
msgstr ""
-#: src/Admin/Pages/Logs.php:66
+#: build/wp-mail-smtp-pro/src/Admin/Pages/LogsTab.php:56
+#: src/Admin/Pages/LogsTab.php:56
msgid "Keep track of every email sent from your WordPress site with email logging. "
msgstr ""
-#: src/Admin/Pages/Logs.php:67
+#: build/wp-mail-smtp-pro/src/Admin/Pages/LogsTab.php:57
+#: src/Admin/Pages/LogsTab.php:57
msgid "Troubleshoot sending issues, recover lost emails, and more!"
msgstr ""
-#: src/Admin/Pages/Logs.php:71
+#: build/wp-mail-smtp-pro/src/Admin/Pages/LogsTab.php:61
+#: src/Admin/Pages/LogsTab.php:61
msgid "Logs Archive Page Screenshot"
msgstr ""
-#: src/Admin/Pages/Logs.php:72
+#: build/wp-mail-smtp-pro/src/Admin/Pages/LogsTab.php:62
+#: src/Admin/Pages/LogsTab.php:62
msgid "Logs Single Page Screenshot"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:24
#: src/Admin/Pages/MiscTab.php:24
msgid "Misc"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:56
#: src/Admin/Pages/MiscTab.php:56
msgid "Do Not Send"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:65
#: src/Admin/Pages/MiscTab.php:65
msgid "Check this if you would like to stop sending all emails."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:71
#: src/Admin/Pages/MiscTab.php:71
msgid "Some plugins, like BuddyPress and Events Manager, are using their own email delivery solutions. By default, this option does not block their emails, as those plugins do not use default wp_mail() function to send emails."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:79
#: src/Admin/Pages/MiscTab.php:79
msgid "You will need to consult with their documentation to switch them to use default WordPress email delivery."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:81
#: src/Admin/Pages/MiscTab.php:81
msgid "Test emails are allowed to be sent, regardless of this option."
msgstr ""
#. translators: %1$s - constant that was used; %2$s - file where it was used.
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:86
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:468
#: src/Admin/Pages/MiscTab.php:86
#: src/Providers/OptionsAbstract.php:468
msgid "The value of this field was set using a constant %1$s most likely inside %2$s of your WordPress installation."
msgstr ""
-#. translators: %s - file to put that constant in.
-#: src/Admin/Pages/MiscTab.php:92
-msgid "If you want to enable this option using constants, put the lines below to your %s file:"
+#. translators: %s - The URL to the constants support article.
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:93
+#: src/Admin/Pages/MiscTab.php:93
+msgid "Please read this support article if you want to enable this option using constants."
msgstr ""
-#: src/Admin/Pages/MiscTab.php:111
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:114
+#: src/Admin/Pages/MiscTab.php:114
msgid "Hide Announcements"
msgstr ""
-#: src/Admin/Pages/MiscTab.php:120
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:123
+#: src/Admin/Pages/MiscTab.php:123
msgid "Check this if you would like to hide plugin announcements and update details."
msgstr ""
-#: src/Admin/Pages/MiscTab.php:130
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:133
+#: src/Admin/Pages/MiscTab.php:133
msgid "Hide Email Delivery Errors"
msgstr ""
-#: src/Admin/Pages/MiscTab.php:146
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:149
+#: src/Admin/Pages/MiscTab.php:149
msgid "Check this if you would like to hide warnings alerting of email delivery errors."
msgstr ""
#. translators: %s - filter that was used to disabled.
-#: src/Admin/Pages/MiscTab.php:153
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:156
+#: src/Admin/Pages/MiscTab.php:156
msgid "Email Delivery Errors were disabled using a %s filter."
msgstr ""
-#: src/Admin/Pages/MiscTab.php:162
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:165
+#: src/Admin/Pages/MiscTab.php:165
msgid "This is not recommended and should only be done for staging or development sites."
msgstr ""
-#: src/Admin/Pages/MiscTab.php:177
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:180
+#: src/Admin/Pages/MiscTab.php:180
msgid "Uninstall WP Mail SMTP"
msgstr ""
-#: src/Admin/Pages/MiscTab.php:185
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:188
+#: src/Admin/Pages/MiscTab.php:188
msgid "Check this if you would like to remove ALL WP Mail SMTP data upon plugin deletion. All settings will be unrecoverable."
msgstr ""
-#: src/Admin/Pages/MiscTab.php:220
+#: build/wp-mail-smtp-pro/src/Admin/Pages/MiscTab.php:223
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:540
+#: src/Admin/Pages/MiscTab.php:223
#: src/Admin/Pages/SettingsTab.php:540
msgid "Settings were successfully saved."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:36
#: src/Admin/Pages/SettingsTab.php:36
msgid "General"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:64
#: src/Admin/Pages/SettingsTab.php:64
msgid "License"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:67
#: src/Admin/Pages/SettingsTab.php:67
msgid "Your license key provides access to updates and support."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:75
#: src/Admin/Pages/SettingsTab.php:75
msgid "License Key"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:85
#: src/Admin/Pages/SettingsTab.php:85
msgid "Mail"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:92
#: src/Admin/Pages/SettingsTab.php:92
msgid "From Email"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:103
#: src/Admin/Pages/SettingsTab.php:103
msgid "The email address which emails are sent from."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:104
#: src/Admin/Pages/SettingsTab.php:104
msgid "If you using an email provider (Gmail, Yahoo, Outlook.com, etc) this should be your email address for that account."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:107
#: src/Admin/Pages/SettingsTab.php:107
msgid "Please note that other plugins can change this, to prevent this use the setting below."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:119
#: src/Admin/Pages/SettingsTab.php:119
msgid "Force From Email"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:124
#: src/Admin/Pages/SettingsTab.php:124
msgid "Current provider will automatically force From Email to be the email address that you use to set up the connection below."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:128
#: src/Admin/Pages/SettingsTab.php:128
msgid "If checked, the From Email setting above will be used for all emails, ignoring values set by other plugins."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:138
#: src/Admin/Pages/SettingsTab.php:138
msgid "From Name"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:149
#: src/Admin/Pages/SettingsTab.php:149
msgid "The name which emails are sent from."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:161
#: src/Admin/Pages/SettingsTab.php:161
msgid "Force From Name"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:166
#: src/Admin/Pages/SettingsTab.php:166
msgid "Current provider doesn't support setting and forcing From Name. Emails will be sent on behalf of the account name used to setup the connection below."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:170
#: src/Admin/Pages/SettingsTab.php:170
msgid "If checked, the From Name setting above will be used for all emails, ignoring values set by other plugins."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:179
#: src/Admin/Pages/SettingsTab.php:179
msgid "Return Path"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:188
#: src/Admin/Pages/SettingsTab.php:188
msgid "Set the return-path to match the From Email"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:192
#: src/Admin/Pages/SettingsTab.php:192
msgid "Return Path indicates where non-delivery receipts - or bounce messages - are to be sent."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:193
#: src/Admin/Pages/SettingsTab.php:193
msgid "If unchecked, bounce messages may be lost. Some providers may ignore this option."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:201
#: src/Admin/Pages/SettingsTab.php:201
msgid "Mailer"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:242
#: src/Admin/Pages/SettingsTab.php:242
msgid "Don't see what you're looking for?"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:244
#: src/Admin/Pages/SettingsTab.php:244
msgid "Suggest a Mailer"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:272
#: src/Admin/Pages/SettingsTab.php:272
msgid "Dismiss this notice"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:314
#: src/Admin/Pages/SettingsTab.php:314
msgid "You're using WP Mail SMTP Lite - no license needed. Enjoy!"
msgstr ""
#. translators: %s - WPMailSMTP.com upgrade URL.
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:320
#: src/Admin/Pages/SettingsTab.php:320
msgid "To unlock more features consider upgrading to PRO."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:339
#: src/Admin/Pages/SettingsTab.php:339
msgid "As a valued WP Mail SMTP Lite user you receive $50 off, automatically applied at checkout!"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:400
#: src/Admin/Pages/SettingsTab.php:400
msgid "Get WP Mail SMTP Pro and Unlock all the Powerful Features"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:404
#: src/Admin/Pages/SettingsTab.php:404
msgid "Thanks for being a loyal WP Mail SMTP user. Upgrade to WP Mail SMTP Pro to unlock more awesome features and experience why WP Mail SMTP is the most popular SMTP plugin."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:408
#: src/Admin/Pages/SettingsTab.php:408
msgid "We know that you will truly love WP Mail SMTP. It's used by over 1,000,000 websites."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:411
#: src/Admin/Pages/SettingsTab.php:411
msgid "Pro Features:"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:415
#: src/Admin/Pages/SettingsTab.php:415
msgid "Manage Notifications - control which emails your site sends"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:416
#: src/Admin/Pages/SettingsTab.php:416
msgid "Email Logging - keep track of every email sent from your site"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:417
#: src/Admin/Pages/SettingsTab.php:417
msgid "Office 365 - send emails using your Office 365 account"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:418
#: src/Admin/Pages/SettingsTab.php:418
msgid "Amazon SES - harness the power of AWS"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:419
#: src/Admin/Pages/SettingsTab.php:419
msgid "Outlook.com - send emails using your Outlook.com account"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:420
#: src/Admin/Pages/SettingsTab.php:420
msgid "Access to our world class support team"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:423
#: src/Admin/Pages/SettingsTab.php:423
msgid "White Glove Setup - sit back and relax while we handle everything for you"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:424
#: src/Admin/Pages/SettingsTab.php:424
msgid "Install WP Mail SMTP Pro plugin"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:425
#: src/Admin/Pages/SettingsTab.php:425
msgid "Set up domain name verification (DNS)"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:426
#: src/Admin/Pages/SettingsTab.php:426
msgid "Configure Mailgun service"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:427
#: src/Admin/Pages/SettingsTab.php:427
msgid "Set up WP Mail SMTP Pro plugin"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:428
#: src/Admin/Pages/SettingsTab.php:428
msgid "Test and verify email delivery"
msgstr ""
#. translators: %s - WPMailSMTP.com URL.
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:436
#: src/Admin/Pages/SettingsTab.php:436
msgid "Get WP Mail SMTP Pro Today and Unlock all the Powerful Features »"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/SettingsTab.php:454
#: src/Admin/Pages/SettingsTab.php:454
msgid "Bonus: WP Mail SMTP users get $50 off regular price, automatically applied at checkout."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:37
#: src/Admin/Pages/TestTab.php:37
msgid "Email Test"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:59
#: src/Admin/Pages/TestTab.php:59
msgid "Send a Test Email"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:66
#: src/Admin/Pages/TestTab.php:66
msgid "Send To"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:72
#: src/Admin/Pages/TestTab.php:72
msgid "Enter email address where test email will be sent."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:80
#: src/Admin/Pages/TestTab.php:80
msgid "HTML"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:86
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:264
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:286
#: src/Admin/Pages/TestTab.php:86
#: src/Providers/OptionsAbstract.php:264
#: src/Providers/OptionsAbstract.php:286
msgid "On"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:87
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:265
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:287
#: src/Admin/Pages/TestTab.php:87
#: src/Providers/OptionsAbstract.php:265
#: src/Providers/OptionsAbstract.php:287
msgid "Off"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:90
#: src/Admin/Pages/TestTab.php:90
msgid "Send this email in HTML or in plain text format."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:110
#: src/Admin/Pages/TestTab.php:110
msgid "You cannot send an email. Mailer is not properly configured. Please check your settings."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:114
#: src/Admin/Pages/TestTab.php:114
msgid "Send Email"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:142
#: src/Admin/Pages/TestTab.php:142
msgid "Test failed. Please use a valid email address and try to resend the test email."
msgstr ""
#. translators: %s - email address a test email will be sent to.
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:154
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:160
#: src/Admin/Pages/TestTab.php:154
#: src/Admin/Pages/TestTab.php:160
msgid "Test email to %s"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:186
#: src/Admin/Pages/TestTab.php:186
msgid "Test plain text email was sent successfully!"
msgstr ""
#. translators: %s - "HTML" in bold.
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:190
#: src/Admin/Pages/TestTab.php:190
msgid "Test %s email was sent successfully! Please check your inbox to make sure it is delivered."
msgstr ""
-#: src/Admin/Pages/TestTab.php:498
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:510
+#: src/Admin/Pages/TestTab.php:510
msgid "SSL certificate issue."
msgstr ""
-#: src/Admin/Pages/TestTab.php:499
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:511
+#: src/Admin/Pages/TestTab.php:511
msgid "This means your web server cannot reliably make secure connections (make requests to HTTPS sites)."
msgstr ""
-#: src/Admin/Pages/TestTab.php:500
-#: src/Admin/Pages/TestTab.php:551
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:512
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:560
+#: src/Admin/Pages/TestTab.php:512
+#: src/Admin/Pages/TestTab.php:560
msgid "Typically this error is returned when web server is not configured properly."
msgstr ""
-#: src/Admin/Pages/TestTab.php:503
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:515
+#: src/Admin/Pages/TestTab.php:515
msgid "Contact your web hosting provider and inform them your site has an issue with SSL certificates."
msgstr ""
-#: src/Admin/Pages/TestTab.php:504
-#: src/Admin/Pages/TestTab.php:555
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:516
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:564
+#: src/Admin/Pages/TestTab.php:516
+#: src/Admin/Pages/TestTab.php:564
msgid "The exact error you can provide them is in the Error log, available at the bottom of this page."
msgstr ""
-#: src/Admin/Pages/TestTab.php:505
-#: src/Admin/Pages/TestTab.php:556
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:517
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:565
+#: src/Admin/Pages/TestTab.php:517
+#: src/Admin/Pages/TestTab.php:565
msgid "Ask them to resolve the issue then try again."
msgstr ""
-#: src/Admin/Pages/TestTab.php:516
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:528
+#: src/Admin/Pages/TestTab.php:528
msgid "Could not connect to host."
msgstr ""
#. translators: %s - SMTP host address.
-#: src/Admin/Pages/TestTab.php:520
-#: src/Admin/Pages/TestTab.php:547
-#: src/Admin/Pages/TestTab.php:620
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:531
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:556
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:658
+#: src/Admin/Pages/TestTab.php:531
+#: src/Admin/Pages/TestTab.php:556
+#: src/Admin/Pages/TestTab.php:658
msgid "This means your web server was unable to connect to %s."
msgstr ""
-#: src/Admin/Pages/TestTab.php:523
-#: src/Admin/Pages/TestTab.php:550
-#: src/Admin/Pages/TestTab.php:623
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:534
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:559
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:661
+#: src/Admin/Pages/TestTab.php:534
+#: src/Admin/Pages/TestTab.php:559
+#: src/Admin/Pages/TestTab.php:661
msgid "This means your web server was unable to connect to the host server."
msgstr ""
-#: src/Admin/Pages/TestTab.php:524
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:535
+#: src/Admin/Pages/TestTab.php:535
msgid "Typically this error is returned your web server is blocking the connections or the SMTP host denying the request."
msgstr ""
#. translators: %s - SMTP host address.
-#: src/Admin/Pages/TestTab.php:529
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:539
+#: src/Admin/Pages/TestTab.php:539
msgid "Contact your web hosting provider and ask them to verify your server can connect to %s. Additionally, ask them if a firewall or security policy may be preventing the connection."
msgstr ""
-#: src/Admin/Pages/TestTab.php:532
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:542
+#: src/Admin/Pages/TestTab.php:542
msgid "If using \"Other SMTP\" Mailer, triple check your SMTP settings including host address, email, and password."
msgstr ""
-#: src/Admin/Pages/TestTab.php:533
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:543
+#: src/Admin/Pages/TestTab.php:543
msgid "If using \"Other SMTP\" Mailer, contact your SMTP host to confirm they are accepting outside connections with the settings you have configured (address, username, port, security, etc)."
msgstr ""
-#: src/Admin/Pages/TestTab.php:543
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:553
+#: src/Admin/Pages/TestTab.php:553
msgid "Could not connect to your host."
msgstr ""
-#: src/Admin/Pages/TestTab.php:554
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:563
+#: src/Admin/Pages/TestTab.php:563
msgid "Contact your web hosting provider and inform them you are having issues making outbound connections."
msgstr ""
-#: src/Admin/Pages/TestTab.php:566
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:575
+#: src/Admin/Pages/TestTab.php:575
msgid "Could not authenticate your SMTP account."
msgstr ""
-#: src/Admin/Pages/TestTab.php:567
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:576
+#: src/Admin/Pages/TestTab.php:576
msgid "This means we were able to connect to your SMTP host, but were not able to proceed using the email/password in the settings."
msgstr ""
-#: src/Admin/Pages/TestTab.php:568
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:577
+#: src/Admin/Pages/TestTab.php:577
msgid "Typically this error is returned when the email or password is not correct or is not what the SMTP host is expecting."
msgstr ""
-#: src/Admin/Pages/TestTab.php:571
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:580
+#: src/Admin/Pages/TestTab.php:580
msgid "Triple check your SMTP settings including host address, email, and password. If you have recently reset your password you will need to update the settings."
msgstr ""
-#: src/Admin/Pages/TestTab.php:572
-#: src/Admin/Pages/TestTab.php:649
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:581
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:686
+#: src/Admin/Pages/TestTab.php:581
+#: src/Admin/Pages/TestTab.php:686
msgid "Contact your SMTP host to confirm you are using the correct username and password."
msgstr ""
-#: src/Admin/Pages/TestTab.php:573
-#: src/Admin/Pages/TestTab.php:650
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:582
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:687
+#: src/Admin/Pages/TestTab.php:582
+#: src/Admin/Pages/TestTab.php:687
msgid "Verify with your SMTP host that your account has permissions to send emails using outside connections."
msgstr ""
-#: src/Admin/Pages/TestTab.php:583
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:592
+#: src/Admin/Pages/TestTab.php:592
msgid "Error due to unsolicited and/or bulk e-mail."
msgstr ""
-#: src/Admin/Pages/TestTab.php:584
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:593
+#: src/Admin/Pages/TestTab.php:593
msgid "This means the connection to your SMTP host was made successfully, but the host rejected the email."
msgstr ""
-#: src/Admin/Pages/TestTab.php:585
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:594
+#: src/Admin/Pages/TestTab.php:594
msgid "Typically this error is returned when you are sending too many e-mails or e-mails that have been identified as spam."
msgstr ""
-#: src/Admin/Pages/TestTab.php:588
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:597
+#: src/Admin/Pages/TestTab.php:597
msgid "Check the emails that are sending are sending individually. Example: email is not sending to 30 recipients. You can install any WordPress e-mail logging plugin to do that."
msgstr ""
-#: src/Admin/Pages/TestTab.php:589
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:598
+#: src/Admin/Pages/TestTab.php:598
msgid "Contact your SMTP host to ask about sending/rate limits."
msgstr ""
-#: src/Admin/Pages/TestTab.php:590
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:599
+#: src/Admin/Pages/TestTab.php:599
msgid "Verify with them your SMTP account is in good standing and your account has not been flagged."
msgstr ""
-#: src/Admin/Pages/TestTab.php:600
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:609
+#: src/Admin/Pages/TestTab.php:609
msgid "Unauthenticated senders are not allowed."
msgstr ""
-#: src/Admin/Pages/TestTab.php:601
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:610
+#: src/Admin/Pages/TestTab.php:610
msgid "This means the connection to your SMTP host was made successfully, but you should enable Authentication and provide correct Username and Password."
msgstr ""
-#: src/Admin/Pages/TestTab.php:604
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:613
+#: src/Admin/Pages/TestTab.php:613
msgid "Go to WP Mail SMTP plugin Settings page."
msgstr ""
-#: src/Admin/Pages/TestTab.php:605
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:614
+#: src/Admin/Pages/TestTab.php:614
msgid "Enable Authentication"
msgstr ""
-#: src/Admin/Pages/TestTab.php:606
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:615
+#: src/Admin/Pages/TestTab.php:615
msgid "Enter correct SMTP Username (usually this is an email address) and Password in the appropriate fields."
msgstr ""
-#: src/Admin/Pages/TestTab.php:616
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:627
+#: src/Admin/Pages/TestTab.php:627
+msgid "Misconfigured server certificate."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:628
+#: src/Admin/Pages/TestTab.php:628
+msgid "This means OpenSSL on your server isn't able to verify the host certificate."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:629
+#: src/Admin/Pages/TestTab.php:629
+msgid "There are a few reasons why this is happening. It could be that the host certificate is misconfigured, or this server's OpenSSL is using an outdated CA bundle."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:632
+#: src/Admin/Pages/TestTab.php:632
+msgid "Verify that the host's SSL certificate is valid."
+msgstr ""
+
+#. translators: %s - URL to the PHP openssl manual
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:635
+#: src/Admin/Pages/TestTab.php:635
+msgid "Contact your hosting support, show them the \"full Error Log for debugging\" below and share this link with them."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:655
+#: src/Admin/Pages/TestTab.php:655
msgid "Could not connect to the SMTP host."
msgstr ""
-#: src/Admin/Pages/TestTab.php:624
-#: src/Admin/Pages/TestTab.php:960
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:662
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1048
+#: src/Admin/Pages/TestTab.php:662
+#: src/Admin/Pages/TestTab.php:1048
msgid "Typically this error is returned for one of the following reasons:"
msgstr ""
-#: src/Admin/Pages/TestTab.php:625
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:663
+#: src/Admin/Pages/TestTab.php:663
msgid "SMTP settings are incorrect (wrong port, security setting, incorrect host)."
msgstr ""
-#: src/Admin/Pages/TestTab.php:626
-#: src/Admin/Pages/TestTab.php:962
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:664
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1050
+#: src/Admin/Pages/TestTab.php:664
+#: src/Admin/Pages/TestTab.php:1050
msgid "Your web server is blocking the connection."
msgstr ""
-#: src/Admin/Pages/TestTab.php:627
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:665
+#: src/Admin/Pages/TestTab.php:665
msgid "Your SMTP host is rejecting the connection."
msgstr ""
-#: src/Admin/Pages/TestTab.php:630
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:668
+#: src/Admin/Pages/TestTab.php:668
msgid "Triple check your SMTP settings including host address, email, and password, port, and security."
msgstr ""
#. translators: %1$s - SMTP host address, %2$s - SMTP port, %3$s - SMTP encryption.
-#: src/Admin/Pages/TestTab.php:634
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:671
+#: src/Admin/Pages/TestTab.php:671
msgid "Contact your web hosting provider and ask them to verify your server can connect to %1$s on port %2$s using %3$s encryption. Additionally, ask them if a firewall or security policy may be preventing the connection - many shared hosts block certain ports. Note: this is the most common cause of this issue."
msgstr ""
-#: src/Admin/Pages/TestTab.php:647
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:684
+#: src/Admin/Pages/TestTab.php:684
msgid "no"
msgstr ""
-#: src/Admin/Pages/TestTab.php:660
-#: src/Admin/Pages/TestTab.php:675
-#: src/Admin/Pages/TestTab.php:691
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:697
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:712
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:728
+#: src/Admin/Pages/TestTab.php:697
+#: src/Admin/Pages/TestTab.php:712
+#: src/Admin/Pages/TestTab.php:728
msgid "Mailgun failed."
msgstr ""
-#: src/Admin/Pages/TestTab.php:661
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:698
+#: src/Admin/Pages/TestTab.php:698
msgid "It seems that you forgot to activate your Mailgun account."
msgstr ""
-#: src/Admin/Pages/TestTab.php:664
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:701
+#: src/Admin/Pages/TestTab.php:701
msgid "Check your inbox you used to create a Mailgun account. Click the activation link in an email from Mailgun."
msgstr ""
-#: src/Admin/Pages/TestTab.php:665
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:702
+#: src/Admin/Pages/TestTab.php:702
msgid "If you do not see activation email, go to your Mailgun control panel and resend the activation email."
msgstr ""
-#: src/Admin/Pages/TestTab.php:676
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:713
+#: src/Admin/Pages/TestTab.php:713
msgid "Typically this error is because there is an issue with your Mailgun settings, in many cases the API key."
msgstr ""
-#: src/Admin/Pages/TestTab.php:679
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:716
+#: src/Admin/Pages/TestTab.php:716
msgid "Verify your API key is correct."
msgstr ""
-#: src/Admin/Pages/TestTab.php:680
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:717
+#: src/Admin/Pages/TestTab.php:717
msgid "Go to your Mailgun account and view your API key."
msgstr ""
-#: src/Admin/Pages/TestTab.php:681
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:718
+#: src/Admin/Pages/TestTab.php:718
msgid "Note that the API key includes the \"key\" prefix, so make sure that it is in the WP Mail SMTP Mailgun API setting."
msgstr ""
-#: src/Admin/Pages/TestTab.php:692
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:729
+#: src/Admin/Pages/TestTab.php:729
msgid "Your Mailgun account does not have access to send emails."
msgstr ""
-#: src/Admin/Pages/TestTab.php:693
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:730
+#: src/Admin/Pages/TestTab.php:730
msgid "Typically this error is because you have not set up and/or complete domain name verification for your Mailgun account."
msgstr ""
#. translators: %s - Mailgun documentation URL.
-#: src/Admin/Pages/TestTab.php:699
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:735
+#: src/Admin/Pages/TestTab.php:735
msgid "Go to our how-to guide for setting up Mailgun with WP Mail SMTP."
msgstr ""
-#: src/Admin/Pages/TestTab.php:710
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:746
+#: src/Admin/Pages/TestTab.php:746
msgid "Complete the steps in section \"2. Verify Your Domain\"."
msgstr ""
-#: src/Admin/Pages/TestTab.php:720
-#: src/Admin/Pages/TestTab.php:771
-#: src/Admin/Pages/TestTab.php:792
-#: src/Admin/Pages/TestTab.php:819
-#: src/Admin/Pages/TestTab.php:835
-#: src/Admin/Pages/TestTab.php:890
-#: src/Admin/Pages/TestTab.php:917
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:756
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:805
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:825
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:851
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:867
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:919
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:945
+#: src/Admin/Pages/TestTab.php:756
+#: src/Admin/Pages/TestTab.php:805
+#: src/Admin/Pages/TestTab.php:825
+#: src/Admin/Pages/TestTab.php:851
+#: src/Admin/Pages/TestTab.php:867
+#: src/Admin/Pages/TestTab.php:919
+#: src/Admin/Pages/TestTab.php:945
msgid "Google API Error."
msgstr ""
-#: src/Admin/Pages/TestTab.php:721
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:757
+#: src/Admin/Pages/TestTab.php:757
msgid "You have not properly configured Gmail mailer."
msgstr ""
-#: src/Admin/Pages/TestTab.php:722
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:758
+#: src/Admin/Pages/TestTab.php:758
msgid "Make sure that you have clicked the \"Allow plugin to send emails using your Google account\" button under Gmail settings."
msgstr ""
-#: src/Admin/Pages/TestTab.php:725
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:761
+#: src/Admin/Pages/TestTab.php:761
msgid "Go to plugin Settings page and click the \"Allow plugin to send emails using your Google account\" button."
msgstr ""
-#: src/Admin/Pages/TestTab.php:726
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:762
+#: src/Admin/Pages/TestTab.php:762
msgid "After the click you should be redirected to a Gmail authorization screen, where you will be asked a permission to send emails on your behalf."
msgstr ""
-#: src/Admin/Pages/TestTab.php:727
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:763
+#: src/Admin/Pages/TestTab.php:763
msgid "Please click \"Agree\", if you see that button. If not - you will need to enable less secure apps first:"
msgstr ""
#. translators: %s - Google support article URL.
-#: src/Admin/Pages/TestTab.php:733
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:768
+#: src/Admin/Pages/TestTab.php:768
msgid "if you are using regular Gmail account, please read this article to proceed."
msgstr ""
#. translators: %s - Google support article URL.
-#: src/Admin/Pages/TestTab.php:749
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:783
+#: src/Admin/Pages/TestTab.php:783
msgid "if you are using G Suite, please read this article to proceed."
msgstr ""
-#: src/Admin/Pages/TestTab.php:772
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:806
+#: src/Admin/Pages/TestTab.php:806
msgid "Typically this error is because address the email was sent to is invalid or was empty."
msgstr ""
-#: src/Admin/Pages/TestTab.php:775
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:809
+#: src/Admin/Pages/TestTab.php:809
msgid "Check the \"Send To\" email address used and confirm it is a valid email and was not empty."
msgstr ""
#. translators: 1 - correct email address example. 2 - incorrect email address example.
-#: src/Admin/Pages/TestTab.php:778
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:811
+#: src/Admin/Pages/TestTab.php:811
msgid "It should be something like this: %1$s. These are incorrect values: %2$s."
msgstr ""
-#: src/Admin/Pages/TestTab.php:782
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:815
+#: src/Admin/Pages/TestTab.php:815
msgid "Make sure that the generated email has a TO header, useful when you are responsible for email creation."
msgstr ""
-#: src/Admin/Pages/TestTab.php:793
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:826
+#: src/Admin/Pages/TestTab.php:826
msgid "Unfortunately, this error can be due to many different reasons."
msgstr ""
#. translators: %s - Blog article URL.
-#: src/Admin/Pages/TestTab.php:799
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:831
+#: src/Admin/Pages/TestTab.php:831
msgid "Please read this article to learn more about what can cause this error and how it can be resolved."
msgstr ""
-#: src/Admin/Pages/TestTab.php:820
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:852
+#: src/Admin/Pages/TestTab.php:852
msgid "Authentication code that Google returned to you has already been used on your previous auth attempt."
msgstr ""
-#: src/Admin/Pages/TestTab.php:823
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:855
+#: src/Admin/Pages/TestTab.php:855
msgid "Make sure that you are not trying to manually clean up the plugin options to retry the \"Allow...\" step."
msgstr ""
-#: src/Admin/Pages/TestTab.php:824
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:856
+#: src/Admin/Pages/TestTab.php:856
msgid "Reinstall the plugin with clean plugin data turned on on Misc page. This will remove all the plugin options and you will be safe to retry."
msgstr ""
-#: src/Admin/Pages/TestTab.php:825
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:857
+#: src/Admin/Pages/TestTab.php:857
msgid "Make sure there is no aggressive caching on site admin area pages or try to clean cache between attempts."
msgstr ""
-#: src/Admin/Pages/TestTab.php:836
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:868
+#: src/Admin/Pages/TestTab.php:868
msgid "There are various reasons for that, please review the steps below."
msgstr ""
#. translators: %s - Google G Suite Admin area URL.
-#: src/Admin/Pages/TestTab.php:842
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:873
+#: src/Admin/Pages/TestTab.php:873
msgid "Make sure that your G Suite trial period has not expired. You can check the status here."
msgstr ""
#. translators: %s - Google G Suite Admin area URL.
-#: src/Admin/Pages/TestTab.php:856
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:886
+#: src/Admin/Pages/TestTab.php:886
msgid "Make sure that Gmail app in your G Suite is actually enabled. You can check that in Apps list in G Suite Admin area."
msgstr ""
#. translators: %s - Google Developers Console URL.
-#: src/Admin/Pages/TestTab.php:870
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:899
+#: src/Admin/Pages/TestTab.php:899
msgid "Make sure that you have Gmail API enabled, and you can do that here."
msgstr ""
-#: src/Admin/Pages/TestTab.php:893
-#: src/Admin/Pages/TestTab.php:921
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:922
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:949
+#: src/Admin/Pages/TestTab.php:922
+#: src/Admin/Pages/TestTab.php:949
msgid "Make sure that the used Client ID/Secret correspond to a proper project that has Gmail API enabled."
msgstr ""
#. translators: %s - Gmail documentation URL.
-#: src/Admin/Pages/TestTab.php:897
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:925
+#: src/Admin/Pages/TestTab.php:925
msgid "Please follow our Gmail tutorial to be sure that all the correct project and data is applied."
msgstr ""
-#: src/Admin/Pages/TestTab.php:918
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:946
+#: src/Admin/Pages/TestTab.php:946
msgid "You may have added a new API to a project"
msgstr ""
-#: src/Admin/Pages/TestTab.php:922
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:950
+#: src/Admin/Pages/TestTab.php:950
msgid "Try to use a separate project for your emails, so the project has only 1 Gmail API in it enabled. You will need to remove the old project and create a new one from scratch."
msgstr ""
-#: src/Admin/Pages/TestTab.php:958
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:960
+#: src/Admin/Pages/TestTab.php:960
+msgid "SMTP.com API Error."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:961
+#: src/Admin/Pages/TestTab.php:961
+msgid "Your Sender Name option is incorrect."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:964
+#: src/Admin/Pages/TestTab.php:964
+msgid "Please make sure you entered an accurate Sender Name in WP Mail SMTP plugin settings."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:974
+#: src/Admin/Pages/TestTab.php:974
+msgid "GuzzleHttp requirements."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:975
+#: src/Admin/Pages/TestTab.php:975
+msgid "GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:978
+#: src/Admin/Pages/TestTab.php:978
+msgid "Edit your php.ini file on your hosting server."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:979
+#: src/Admin/Pages/TestTab.php:979
+msgid "(Recommended) Enable PHP extension: cURL, by adding \"extension=curl\" to the php.ini file (without the quotation marks) OR"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:980
+#: src/Admin/Pages/TestTab.php:980
+msgid "(If cURL can't be enabled on your hosting server) Enable PHP setting: allow_url_fopen, by adding \"allow_url_fopen = On\" to the php.ini file (without the quotation marks)"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:981
+#: src/Admin/Pages/TestTab.php:981
+msgid "If you don't know how to do the above we strongly suggest contacting your hosting support and provide them the \"full Error Log for debugging\" below and these steps. They should be able to fix this issue for you."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1003
+#: src/Admin/Pages/TestTab.php:1003
+msgid "PCRE library issue"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1004
+#: src/Admin/Pages/TestTab.php:1004
+msgid "It looks like your server is running PHP version 7.4.x with an outdated PCRE library (libpcre2) that has a known issue with email address validation."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1005
+#: src/Admin/Pages/TestTab.php:1005
+msgid "There is a known issue with PHP version 7.4.x, when using libpcre2 library version lower than 10.33."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1008
+#: src/Admin/Pages/TestTab.php:1008
+msgid "Contact your web hosting provider and inform them you are having issues with libpcre2 library on PHP 7.4."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1009
+#: src/Admin/Pages/TestTab.php:1009
+msgid "They should be able to resolve this issue for you."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1010
+#: src/Admin/Pages/TestTab.php:1010
+msgid "For a quick fix, until your web hosting resolves this, you can downgrade to PHP version 7.3 on your server."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1046
+#: src/Admin/Pages/TestTab.php:1046
msgid "An issue was detected."
msgstr ""
-#: src/Admin/Pages/TestTab.php:959
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1047
+#: src/Admin/Pages/TestTab.php:1047
msgid "This means your test email was unable to be sent."
msgstr ""
-#: src/Admin/Pages/TestTab.php:961
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1049
+#: src/Admin/Pages/TestTab.php:1049
msgid "Plugin settings are incorrect (wrong SMTP settings, invalid Mailer configuration, etc)."
msgstr ""
-#: src/Admin/Pages/TestTab.php:963
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1051
+#: src/Admin/Pages/TestTab.php:1051
msgid "Your host is rejecting the connection."
msgstr ""
-#: src/Admin/Pages/TestTab.php:966
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1054
+#: src/Admin/Pages/TestTab.php:1054
msgid "Triple check the plugin settings, consider reconfiguring to make sure everything is correct (eg bad copy and paste)."
msgstr ""
-#: src/Admin/Pages/TestTab.php:968
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1056
+#: src/Admin/Pages/TestTab.php:1056
msgid "Contact your web hosting provider and ask them to verify your server can make outside connections. Additionally, ask them if a firewall or security policy may be preventing the connection - many shared hosts block certain ports. Note: this is the most common cause of this issue."
msgstr ""
-#: src/Admin/Pages/TestTab.php:974
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1062
+#: src/Admin/Pages/TestTab.php:1062
msgid "Try using a different mailer."
msgstr ""
-#: src/Admin/Pages/TestTab.php:993
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1081
+#: src/Admin/Pages/TestTab.php:1081
msgid "There was a problem while sending the test email."
msgstr ""
-#: src/Admin/Pages/TestTab.php:1003
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1091
+#: src/Admin/Pages/TestTab.php:1091
msgid "Recommended next steps:"
msgstr ""
-#: src/Admin/Pages/TestTab.php:1013
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1101
+#: src/Admin/Pages/TestTab.php:1101
msgid "Need support?"
msgstr ""
#. translators: %s - WPMailSMTP.com account area link.
-#: src/Admin/Pages/TestTab.php:1021
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1109
+#: src/Admin/Pages/TestTab.php:1109
msgid "As a WP Mail SMTP Pro user you have access to WP Mail SMTP priority support. Please log in to your WPMailSMTP.com account and submit a support ticket."
msgstr ""
-#: src/Admin/Pages/TestTab.php:1038
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1126
+#: src/Admin/Pages/TestTab.php:1126
msgid "WP Mail SMTP is a free plugin, and the team behind WPForms maintains it to give back to the WordPress community."
msgstr ""
#. translators: %s - WPMailSMTP.com URL.
-#: src/Admin/Pages/TestTab.php:1045
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1133
+#: src/Admin/Pages/TestTab.php:1133
msgid "To access our world class support, please upgrade to WP Mail SMTP Pro. Along with getting expert support, you will also get Notification controls, Email Logging, and integrations for Amazon SES, Office 365, and Outlook.com."
msgstr ""
-#: src/Admin/Pages/TestTab.php:1060
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1148
+#: src/Admin/Pages/TestTab.php:1148
msgid "Additionally, you can take advantage of our White Glove Setup. Sit back and relax while we handle everything for you! If you simply don't have time or maybe you feel a bit in over your head - we got you covered."
msgstr ""
-#: src/Admin/Pages/TestTab.php:1066
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1154
+#: src/Admin/Pages/TestTab.php:1154
msgid "As a valued WP Mail SMTP user, you will get $50 off regular pricing, automatically applied at checkout!"
msgstr ""
#. translators: %1$s - WP Mail SMTP support policy URL, %2$s - WP Mail SMTP support forum URL, %3$s - WPMailSMTP.com URL.
-#: src/Admin/Pages/TestTab.php:1080
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1168
+#: src/Admin/Pages/TestTab.php:1168
msgid "Alternatively, we also offer limited support on the WordPress.org support forums. You can create a support thread there, but please understand that free support is not guaranteed and is limited to simple issues. If you have an urgent or complex issue, then please consider upgrading to WP Mail SMTP Pro to access our priority support ticket system."
msgstr ""
-#: src/Admin/Pages/TestTab.php:1101
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1189
+#: src/Admin/Pages/TestTab.php:1189
msgid "Click here to view the full Error Log for debugging"
msgstr ""
-#: src/Admin/Pages/TestTab.php:1110
+#: build/wp-mail-smtp-pro/src/Admin/Pages/TestTab.php:1198
+#: src/Admin/Pages/TestTab.php:1198
msgid "Please copy only the content of the error debug message above, identified with an orange left border, into the support forum topic if you experience any issues."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Admin/Review.php:119
+#: src/Admin/Review.php:119
+msgid "Are you enjoying WP Mail SMTP?"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Review.php:121
+#: src/Admin/Review.php:121
+msgid "Yes"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Review.php:122
+#: src/Admin/Review.php:122
+msgid "Not Really"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Review.php:126
+#: src/Admin/Review.php:126
+msgid "We're sorry to hear you aren't enjoying WP Mail SMTP. We would love a chance to improve. Could you take a minute and let us know what we can do better?"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Review.php:129
+#: src/Admin/Review.php:129
+msgid "Give Feedback"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Review.php:132
+#: src/Admin/Review.php:132
+msgid "No thanks"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Review.php:137
+#: src/Admin/Review.php:137
+msgid "That’s awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Review.php:138
+#: src/Admin/Review.php:138
+msgid "~ Jared Atchison Lead Developer, WP Mail SMTP"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Review.php:141
+#: src/Admin/Review.php:141
+msgid "Ok, you deserve it"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Review.php:143
+#: src/Admin/Review.php:143
+msgid "Nope, maybe later"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Admin/Review.php:144
+#: src/Admin/Review.php:144
+msgid "I already did"
+msgstr ""
+
#. translators: %1$s - Plugin name causing conflict; %2$s - Plugin name causing conflict.
+#: build/wp-mail-smtp-pro/src/Conflicts.php:159
#: src/Conflicts.php:159
msgid "Heads up! WP Mail SMTP has detected %1$s is activated. Please deactivate %2$s to prevent conflicts."
msgstr ""
#. translators: %1$s - WP Mail SMTP plugin name; %2$s - WPMailSMTP.com URL to a related doc.
-#: src/Core.php:342
+#: build/wp-mail-smtp-pro/src/Core.php:367
+#: src/Core.php:367
msgid "Your site is running an outdated version of PHP that is no longer supported and may cause issues with %1$s. Read more for additional information."
msgstr ""
-#: src/Core.php:356
+#: build/wp-mail-smtp-pro/src/Core.php:381
+#: src/Core.php:381
msgid "Please Note: Support for PHP 5.5 will be discontinued in 2020. After this, if no further action is taken, WP Mail SMTP functionality will be disabled."
msgstr ""
#. translators: %s - plugin name and its version.
-#: src/Core.php:390
+#: build/wp-mail-smtp-pro/src/Core.php:415
+#: src/Core.php:415
msgid "EMAILING DISABLED: The %s is currently blocking all emails from being sent."
msgstr ""
#. translators: %1$s - constant name; %2$s - constant value.
-#: src/Core.php:401
+#: build/wp-mail-smtp-pro/src/Core.php:426
+#: src/Core.php:426
msgid "To send emails, change the value of the %1$s constant to %2$s."
msgstr ""
#. translators: %s - plugin Misc settings page URL.
-#: src/Core.php:412
+#: build/wp-mail-smtp-pro/src/Core.php:437
+#: src/Core.php:437
msgid "To send emails, go to plugin Misc settings and disable the \"Do Not Send\" option."
msgstr ""
#. translators: %s - plugin name and its version.
-#: src/Core.php:444
+#: build/wp-mail-smtp-pro/src/Core.php:469
+#: src/Core.php:469
msgid "EMAIL DELIVERY ERROR: the plugin %s logged this error during the last time it tried to send an email:"
msgstr ""
-#: src/Core.php:474
+#: build/wp-mail-smtp-pro/src/Core.php:499
+#: src/Core.php:499
msgid "Consider running an email test after fixing it."
msgstr ""
+#. translators: %1$s - WP Mail SMTP, %2$s - error message.
+#: build/wp-mail-smtp-pro/src/Migration.php:137
+#: src/Migration.php:137
+msgid "There was an error while upgrading the database. Please contact %1$s support with this information: %2$s."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Pro/Providers/Providers.php:158
+#: src/Pro/Providers/Providers.php:158
+msgid "OK"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Pro/SiteHealth.php:58
#: src/Pro/SiteHealth.php:58
msgid "Is wpmailsmtp.com reachable?"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/AmazonSES/Options.php:25
#: src/Providers/AmazonSES/Options.php:25
msgid "Amazon SES"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/AmazonSES/Options.php:39
#: src/Providers/AmazonSES/Options.php:39
msgid "We're sorry, the Amazon SES mailer is not available on your plan. Please upgrade to the PRO plan to unlock all these awesome features."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Auth.php:170
#: src/Providers/Gmail/Auth.php:170
msgid "There was an error while processing the Google authentication request. Please make sure that you have Client ID and Client Secret both valid and saved."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Mailer.php:258
+#: src/Providers/Gmail/Mailer.php:258
+msgid "Please re-grant Google app permissions!"
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Mailer.php:259
+#: src/Providers/Gmail/Mailer.php:259
+msgid "Go to WP Mail SMTP plugin settings page. Click the “Remove Connection” button."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Mailer.php:260
+#: src/Providers/Gmail/Mailer.php:260
+msgid "Then click the “Allow plugin to send emails using your Google account” button and re-enable access."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:32
#: src/Providers/Gmail/Options.php:32
msgid "Gmail"
msgstr ""
#. translators: %s - URL to our Gmail doc.
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:35
#: src/Providers/Gmail/Options.php:35
msgid "Send emails using your Gmail or G Suite (formerly Google Apps) account, all while keeping your login credentials safe. Other Google SMTP methods require enabling less secure apps in your account and entering your password. However, this integration uses the Google API to improve email delivery issues while keeping your site secure.
Read our Gmail documentation to learn how to configure Gmail or G Suite."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:48
#: src/Providers/Gmail/Options.php:48
msgid "The Gmail mailer works well for sites that send low numbers of emails. However, Gmail's API has rate limitations and a number of additional restrictions that can lead to challenges during setup. If you expect to send a high volume of emails, or if you find that your web host is not compatible with the Gmail API restrictions, then we recommend considering a different mailer option."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:72
#: src/Providers/Gmail/Options.php:72
msgid "Client ID"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:87
#: src/Providers/Gmail/Options.php:87
msgid "Client Secret"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:109
#: src/Providers/Gmail/Options.php:109
msgid "Authorized redirect URI"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:117
#: src/Providers/Gmail/Options.php:117
msgid "Copy URL to clipboard"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:122
#: src/Providers/Gmail/Options.php:122
msgid "Please copy this URL into the \"Authorized redirect URIs\" field of your Google web application."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:131
#: src/Providers/Gmail/Options.php:131
msgid "Authorization"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:159
#: src/Providers/Gmail/Options.php:159
msgid "Allow plugin to send emails using your Google account"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:162
#: src/Providers/Gmail/Options.php:162
msgid "Click the button above to confirm authorization."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:168
#: src/Providers/Gmail/Options.php:168
msgid "Remove Connection"
msgstr ""
#. translators: %s - email address, as received from Google API.
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:177
#: src/Providers/Gmail/Options.php:177
msgid "Connected as %s"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:184
#: src/Providers/Gmail/Options.php:184
msgid "Removing the connection will give you an ability to redo the connection or link to another Google account."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Gmail/Options.php:192
#: src/Providers/Gmail/Options.php:192
msgid "You need to save settings with Client ID and Client Secret before you can proceed."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Mail/Options.php:25
#: src/Providers/Mail/Options.php:25
msgid "Default (none)"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Mail/Options.php:37
#: src/Providers/Mail/Options.php:37
msgid "You currently have the native WordPress option selected. Please select any other Mailer option above to continue the setup."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:25
#: src/Providers/Mailgun/Options.php:25
msgid "Mailgun"
msgstr ""
#. translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag.
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:29
#: src/Providers/Mailgun/Options.php:29
msgid "%1$sMailgun%2$s is one of the leading transactional email services trusted by over 150,000+ businesses. They provide 5,000 free emails per month for 3 months.
Read our %3$sMailgun documentation%4$s to learn how to configure Mailgun and improve your email deliverability."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:57
#: src/Providers/Mailgun/Options.php:57
msgid "Private API Key"
msgstr ""
#. translators: %s - API key link.
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:76
#: src/Providers/Mailgun/Options.php:76
msgid "Follow this link to get an API Key from Mailgun: %s."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:78
#: src/Providers/Mailgun/Options.php:78
msgid "Get a Private API Key"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:89
#: src/Providers/Mailgun/Options.php:89
msgid "Domain Name"
msgstr ""
#. translators: %s - Domain Name link.
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:101
#: src/Providers/Mailgun/Options.php:101
msgid "Follow this link to get a Domain Name from Mailgun: %s."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:103
#: src/Providers/Mailgun/Options.php:103
msgid "Get a Domain Name"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:114
#: src/Providers/Mailgun/Options.php:114
msgid "Region"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:124
#: src/Providers/Mailgun/Options.php:124
msgid "US"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:133
#: src/Providers/Mailgun/Options.php:133
msgid "EU"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:137
#: src/Providers/Mailgun/Options.php:137
msgid "Define which endpoint you want to use for sending messages."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:138
#: src/Providers/Mailgun/Options.php:138
msgid "If you are operating under EU laws, you may be required to use EU region."
msgstr ""
#. translators: %s - URL to Mailgun.com page.
+#: build/wp-mail-smtp-pro/src/Providers/Mailgun/Options.php:143
#: src/Providers/Mailgun/Options.php:143
msgid "More information on Mailgun.com."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:186
#: src/Providers/OptionsAbstract.php:186
msgid "SMTP Host"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:200
#: src/Providers/OptionsAbstract.php:200
msgid "Encryption"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:210
#: src/Providers/OptionsAbstract.php:210
msgid "None"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:219
#: src/Providers/OptionsAbstract.php:219
msgid "SSL"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:228
#: src/Providers/OptionsAbstract.php:228
msgid "TLS"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:232
#: src/Providers/OptionsAbstract.php:232
msgid "For most servers TLS is the recommended option. If your SMTP provider offers both SSL and TLS options, we recommend using TLS."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:240
#: src/Providers/OptionsAbstract.php:240
msgid "SMTP Port"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:254
#: src/Providers/OptionsAbstract.php:254
msgid "Auto TLS"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:268
#: src/Providers/OptionsAbstract.php:268
msgid "By default TLS encryption is automatically used if the server supports it, which is recommended. In some cases, due to server misconfigurations, this can cause issues and may need to be disabled."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:276
#: src/Providers/OptionsAbstract.php:276
msgid "Authentication"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:295
#: src/Providers/OptionsAbstract.php:295
msgid "SMTP Username"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:309
#: src/Providers/OptionsAbstract.php:309
msgid "SMTP Password"
msgstr ""
#. translators: %s - constant name: WPMS_SMTP_PASS.
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:321
#: src/Providers/OptionsAbstract.php:321
msgid "To change the password you need to change the value of the constant there: %s"
msgstr ""
#. translators: %1$s - wp-config.php file, %2$s - WPMS_ON constant name.
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:329
#: src/Providers/OptionsAbstract.php:329
msgid "If you want to disable the use of constants, find in %1$s file the constant %2$s and turn if off:"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:339
#: src/Providers/OptionsAbstract.php:339
msgid "All the defined constants will stop working and you will be able to change all the values on this page."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:347
#: src/Providers/OptionsAbstract.php:347
-msgid "The password is stored in plain text. We highly recommend you set up your password in your WordPress configuration file for improved security."
+msgid "The password will be stored in plain text. For improved security, we highly recommend using your site's WordPress configuration file to set your password."
msgstr ""
-#. translators: %s - wp-config.php.
-#: src/Providers/OptionsAbstract.php:352
-msgid "To do this add the lines below to your %s file:"
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:350
+#: src/Providers/OptionsAbstract.php:350
+msgid "Learn More"
msgstr ""
#. translators: %1$s - Provider name; %2$s - PHP version required by Provider; %3$s - current PHP version.
-#: src/Providers/OptionsAbstract.php:418
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:410
+#: src/Providers/OptionsAbstract.php:410
msgid "%1$s requires PHP %2$s to work and does not support your current PHP version %3$s. Please contact your host and request a PHP upgrade to the latest one."
msgstr ""
-#: src/Providers/OptionsAbstract.php:425
-#: src/Providers/OptionsAbstract.php:449
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:417
+#: src/Providers/OptionsAbstract.php:417
msgid "Meanwhile you can switch to some other mailers."
msgstr ""
-#. translators: %s - Provider name.
-#: src/Providers/OptionsAbstract.php:444
-msgid "%s requires a SSL certificate on a site to work and does not support your current installation. Please contact your host and request a SSL certificate or install a free one, like Let's Encrypt."
+#. translators: %s - Provider name
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:436
+#: src/Providers/OptionsAbstract.php:436
+msgid "%s requires an SSL certificate, and so is not currently compatible with your site. Please contact your host to request a SSL certificate, or check out WPBeginner's tutorial on how to set up SSL."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/OptionsAbstract.php:449
+#: src/Providers/OptionsAbstract.php:449
+msgid "If you'd prefer not to set up SSL, or need an SMTP solution in the meantime, please select a different mailer option."
+msgstr ""
+
+#: build/wp-mail-smtp-pro/src/Providers/Outlook/Options.php:25
#: src/Providers/Outlook/Options.php:25
msgid "Outlook"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Outlook/Options.php:39
#: src/Providers/Outlook/Options.php:39
msgid "We're sorry, the Microsoft Outlook mailer is not available on your plan. Please upgrade to the PRO plan to unlock all these awesome features."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Pepipost/Options.php:25
#: src/Providers/Pepipost/Options.php:25
msgid "Pepipost SMTP"
msgstr ""
#. translators: %1$s - URL to pepipost.com site.
+#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:31
#: src/Providers/PepipostAPI/Options.php:31
msgid "Pepipost is a recommended transactional email service. Every month Pepipost delivers over 8 billion emails from 20,000+ customers. Their mission is to reliably send emails in the most efficient way and at the most disruptive pricing ever. Pepipost provides users 30,000 free emails the first 30 days."
msgstr ""
#. translators: %1$s - URL to wpmailsmtp.com doc.
+#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:34
#: src/Providers/PepipostAPI/Options.php:34
msgid "Read our Pepipost documentation to learn how to configure Pepipost and improve your email deliverability."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:53
#: src/Providers/PepipostAPI/Options.php:53
msgid "Get Started with Pepipost"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:61
#: src/Providers/PepipostAPI/Options.php:61
msgid "Pepipost"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:88
+#: build/wp-mail-smtp-pro/src/Providers/Sendgrid/Options.php:57
+#: build/wp-mail-smtp-pro/src/Providers/Sendinblue/Options.php:76
+#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:83
#: src/Providers/PepipostAPI/Options.php:88
#: src/Providers/Sendgrid/Options.php:57
#: src/Providers/Sendinblue/Options.php:76
@@ -1484,180 +2080,222 @@ msgid "API Key"
msgstr ""
#. translators: %s - link to get an API Key.
+#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:107
+#: build/wp-mail-smtp-pro/src/Providers/Sendinblue/Options.php:95
#: src/Providers/PepipostAPI/Options.php:107
#: src/Providers/Sendinblue/Options.php:95
msgid "Follow this link to get an API Key: %s."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/PepipostAPI/Options.php:109
#: src/Providers/PepipostAPI/Options.php:109
msgid "Get the API Key"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Sendgrid/Options.php:25
#: src/Providers/Sendgrid/Options.php:25
msgid "SendGrid"
msgstr ""
#. translators: %1$s - opening link tag; %2$s - closing link tag; %3$s - opening link tag; %4$s - closing link tag.
+#: build/wp-mail-smtp-pro/src/Providers/Sendgrid/Options.php:29
#: src/Providers/Sendgrid/Options.php:29
msgid "%1$sSendGrid%2$s is one of the leading transactional email services, sending over 35 billion emails every month. They provide users 100 free emails per day.
Read our %3$sSendGrid documentation%4$s to learn how to set up SendGrid and improve your email deliverability."
msgstr ""
#. translators: %s - API key link.
+#: build/wp-mail-smtp-pro/src/Providers/Sendgrid/Options.php:76
#: src/Providers/Sendgrid/Options.php:76
msgid "Follow this link to get an API Key from SendGrid: %s."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Sendgrid/Options.php:78
#: src/Providers/Sendgrid/Options.php:78
msgid "Create API Key"
msgstr ""
#. translators: %s - SendGrid access level.
+#: build/wp-mail-smtp-pro/src/Providers/Sendgrid/Options.php:86
#: src/Providers/Sendgrid/Options.php:86
msgid "To send emails you will need only a %s access level for this API key."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Sendinblue/Options.php:33
#: src/Providers/Sendinblue/Options.php:33
msgid "Sendinblue"
msgstr ""
#. translators: %1$s - URL to sendinblue.com site.
+#: build/wp-mail-smtp-pro/src/Providers/Sendinblue/Options.php:37
#: src/Providers/Sendinblue/Options.php:37
msgid "Sendinblue serves 80,000+ growing companies around the world and sends over 30 million emails each day. They provide users 300 free emails per day."
msgstr ""
#. translators: %2$s - URL to wpmailsmtp.com doc.
+#: build/wp-mail-smtp-pro/src/Providers/Sendinblue/Options.php:40
#: src/Providers/Sendinblue/Options.php:40
msgid "Read our Sendinblue documentation to learn how to configure Sendinblue and improve your email deliverability."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/Sendinblue/Options.php:97
#: src/Providers/Sendinblue/Options.php:97
msgid "Get v3 API Key"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/SMTP/Options.php:25
#: src/Providers/SMTP/Options.php:25
msgid "Other SMTP"
msgstr ""
#. translators: %s - URL to SMTP documentation.
+#: build/wp-mail-smtp-pro/src/Providers/SMTP/Options.php:29
#: src/Providers/SMTP/Options.php:29
msgid "Use the SMTP details provided by your hosting provider or email service.
To see recommended settings for the popular services as well as troubleshooting tips, check out our SMTP documentation."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Mailer.php:433
#: src/Providers/SMTPcom/Mailer.php:433
msgid "Api Key:"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Mailer.php:435
#: src/Providers/SMTPcom/Mailer.php:435
msgid "Channel:"
msgstr ""
#. translators: %s - URL to smtp.com site.
+#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:41
#: src/Providers/SMTPcom/Options.php:41
-msgid "SMTP.com is a recommended transactional email service. With over 22 years of email delivery expertise, SMTP.com has been around for almost as long as email itself. They are known among internet providers as one of the most reliable senders on the internet. Their easy integration process lets you start sending emails in minutes and benefit from years of experience. SMTP.com provides users 10,000 free emails the first 30 days."
+msgid "SMTP.com is a recommended transactional email service. With a 22 years of track record of reliable email delivery, SMTP.com is a premiere solution for WordPress developers and website owners. SMTP.com has been around for almost as long as email itself. Their super simple integration interface makes it easy to get started while a powerful API and robust documentation make it a preferred choice among developers. Start a 30-day free trial with 50,000 emails."
msgstr ""
#. translators: %s - URL to wpmailsmtp.com doc page for stmp.com.
+#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:49
#: src/Providers/SMTPcom/Options.php:49
msgid "Read our SMTP.com documentation to learn how to configure SMTP.com and improve your email deliverability."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:59
#: src/Providers/SMTPcom/Options.php:59
msgid "Get Started with SMTP.com"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:67
#: src/Providers/SMTPcom/Options.php:67
msgid "SMTP.com"
msgstr ""
#. translators: %s - API key link.
+#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:101
#: src/Providers/SMTPcom/Options.php:101
msgid "Follow this link to get an API Key from SMTP.com: %s."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:103
#: src/Providers/SMTPcom/Options.php:103
msgid "Get API Key"
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:114
#: src/Providers/SMTPcom/Options.php:114
msgid "Sender Name"
msgstr ""
#. translators: %s - Channel/Sender Name link for smtp.com documentation.
+#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:130
#: src/Providers/SMTPcom/Options.php:130
msgid "Follow this link to get a Sender Name from SMTP.com: %s."
msgstr ""
+#: build/wp-mail-smtp-pro/src/Providers/SMTPcom/Options.php:132
#: src/Providers/SMTPcom/Options.php:132
msgid "Get Sender Name"
msgstr ""
+#: build/wp-mail-smtp-pro/src/SiteHealth.php:67
#: src/SiteHealth.php:67
msgid "Is WP Mail SMTP mailer setup complete?"
msgstr ""
+#: build/wp-mail-smtp-pro/src/SiteHealth.php:92
#: src/SiteHealth.php:92
msgid "Version"
msgstr ""
+#: build/wp-mail-smtp-pro/src/SiteHealth.php:96
#: src/SiteHealth.php:96
msgid "License key type"
msgstr ""
+#: build/wp-mail-smtp-pro/src/SiteHealth.php:100
#: src/SiteHealth.php:100
msgid "Debug"
msgstr ""
+#: build/wp-mail-smtp-pro/src/SiteHealth.php:101
#: src/SiteHealth.php:101
msgid "No debug notices found."
msgstr ""
+#: build/wp-mail-smtp-pro/src/SiteHealth.php:131
#: src/SiteHealth.php:131
msgid "Current mailer"
msgstr ""
+#: build/wp-mail-smtp-pro/src/SiteHealth.php:136
#: src/SiteHealth.php:136
msgid "WP Mail SMTP mailer setup is complete"
msgstr ""
+#: build/wp-mail-smtp-pro/src/SiteHealth.php:145
#: src/SiteHealth.php:145
msgid "The WP Mail SMTP plugin mailer setup is complete. You can send a test email, to make sure it's working properly."
msgstr ""
+#: build/wp-mail-smtp-pro/src/SiteHealth.php:150
#: src/SiteHealth.php:150
msgid "Test email sending"
msgstr ""
+#: build/wp-mail-smtp-pro/src/SiteHealth.php:158
#: src/SiteHealth.php:158
msgid "You currently have the default mailer selected, which means that you haven’t set up SMTP yet."
msgstr ""
+#: build/wp-mail-smtp-pro/src/SiteHealth.php:163
#: src/SiteHealth.php:163
msgid "WP Mail SMTP mailer setup is incomplete"
msgstr ""
+#: build/wp-mail-smtp-pro/src/SiteHealth.php:169
#: src/SiteHealth.php:169
msgid "The WP Mail SMTP plugin mailer setup is incomplete. Please click on the link below to access plugin settings and configure the mailer."
msgstr ""
+#: build/wp-mail-smtp-pro/src/SiteHealth.php:174
#: src/SiteHealth.php:174
msgid "Configure mailer"
msgstr ""
#. translators: %1$s - date, \a\t - specially escaped "at", %2$s - time.
-#: src/WP.php:183
+#: build/wp-mail-smtp-pro/src/WP.php:190
+#: src/WP.php:190
msgid "%1$s \\a\\t %2$s"
msgstr ""
+#: build/wp-mail-smtp-pro/wp_mail_smtp.php:135
#: wp_mail_smtp.php:135
msgid "Please deactivate the free version of the WP Mail SMTP plugin before activating WP Mail SMTP Pro."
msgstr ""
#. translators: %1$s - WPBeginner URL for recommended WordPress hosting.
+#: build/wp-mail-smtp-pro/wp_mail_smtp.php:163
#: wp_mail_smtp.php:163
msgid "Your site is running an insecure version of PHP that is no longer supported. Please contact your web hosting provider to update your PHP version or switch to a recommended WordPress hosting company."
msgstr ""
#. translators: %s - WPMailSMTP.com docs URL with more details.
+#: build/wp-mail-smtp-pro/wp_mail_smtp.php:180
#: wp_mail_smtp.php:180
msgid "WP Mail SMTP plugin is disabled on your site until you fix the issue. Read more for additional information."
msgstr ""
diff --git a/wp-content/plugins/wp-mail-smtp/readme.txt b/wp-content/plugins/wp-mail-smtp/readme.txt
index 8d2618d7..af20fb5b 100644
--- a/wp-content/plugins/wp-mail-smtp/readme.txt
+++ b/wp-content/plugins/wp-mail-smtp/readme.txt
@@ -3,7 +3,7 @@ Contributors: wpforms, jaredatch, smub, slaFFik
Tags: smtp, wp mail smtp, wordpress smtp, gmail smtp, sendgrid smtp, mailgun smtp, mail, mailer, phpmailer, wp_mail, email, mailgun, sengrid, gmail, pepipost, sendinblue, wp smtp
Requires at least: 4.9
Tested up to: 5.4
-Stable tag: 2.0.1
+Stable tag: 2.1.1
Requires PHP: 5.5.0
The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 1 million sites.
@@ -62,7 +62,7 @@ SMTP.com is a recommended transactional email service.
With over 22 years of email delivery expertise, SMTP.com has been around for almost as long as email itself. They are known among internet providers as one of the most reliable senders on the internet.
-Their easy integration process lets you start sending emails in minutes and benefit from years of experience. SMTP.com provides users 10,000 free emails the first 30 days.
+Their easy integration process lets you start sending emails in minutes and benefit from years of experience. SMTP.com provides users 50,000 free emails the first 30 days.
Read our SMTP.com documentation for more details.
@@ -229,6 +229,24 @@ By all means please contact us to discuss features or options you'd like to see
== Changelog ==
+= 2.1.1 - 2020-06-08 =
+* Changed: Remove current automatic default reply-to address and add WP filter `wp_mail_smtp_processor_set_default_reply_to` for setting default reply-to addresses.
+* Changed: Improve description for several options with links to an article about how to properly use constants.
+* Fixed: PHP parse error connected to Monolog library on PHP versions < 7.x.
+
+= 2.1.0 - 2020-06-04 =
+* Added: Async/scheduled tasks management support.
+* Added: New warning notification for selecting the "Default (none)" mailer and saving the plugin settings.
+* Changed: Set the original From Email as Reply-To address if it was overwritten by the Force From Email option.
+* Changed: The Force From Email option is now enabled by default, for new plugin installs.
+* Changed: Reply-To header is now set when not provided, equals to From Name/Email.
+* Fixed: Display a non-empty PHPMailer error when some non-SMTP mailers generate errors.
+* Fixed: Display a more accurate message, when the "channel - not found" error is triggered by SMTP.com API.
+* Fixed: Save and display debug errors for the "Other SMTP" mailer.
+* Fixed: Improve the debug details for the "Invalid address (setFrom)" error in the Email Test tab.
+* Fixed: Improve the debug details for SMTP CA verification fail, Gmail Guzzle requirements, and Gmail invalid grant errors.
+* Fixed: Improve the uninstall cleanup procedure.
+
= 2.0.1 - 2020-05-07 =
* Changed: Improved description of the "Do Not Send" plugin option.
* Fixed: Due to Pepipost API changes we now convert new lines so they are preserved in plain text emails.
diff --git a/wp-content/plugins/wp-mail-smtp/src/Admin/Area.php b/wp-content/plugins/wp-mail-smtp/src/Admin/Area.php
index d863acd3..7c6f7312 100644
--- a/wp-content/plugins/wp-mail-smtp/src/Admin/Area.php
+++ b/wp-content/plugins/wp-mail-smtp/src/Admin/Area.php
@@ -13,20 +13,26 @@ use WPMailSMTP\Options;
class Area {
/**
+ * Slug of the admin area page.
+ *
* @since 1.0.0
*
- * @var string Slug of the admin area page.
+ * @var string
*/
const SLUG = 'wp-mail-smtp';
/**
+ * Admin page unique hook.
+ *
* @since 1.0.0
*
- * @var string Admin page unique hook.
+ * @var string
*/
public $hook;
/**
+ * List of admin area pages.
+ *
* @since 1.0.0
*
* @var PageAbstract[]
@@ -34,11 +40,13 @@ class Area {
private $pages;
/**
+ * List of official registered pages.
+ *
* @since 1.5.0
*
- * @var array List of official registered pages.
+ * @var array
*/
- public static $pages_registered = array( 'general', 'logs', 'about' );
+ public static $pages_registered = [ 'general', 'logs', 'about' ];
/**
* Area constructor.
@@ -46,6 +54,7 @@ class Area {
* @since 1.0.0
*/
public function __construct() {
+
$this->hooks();
}
@@ -57,34 +66,39 @@ class Area {
protected function hooks() {
// Add the Settings link to a plugin on Plugins page.
- add_filter( 'plugin_action_links_' . plugin_basename( WPMS_PLUGIN_FILE ), array( $this, 'add_plugin_action_link' ), 10, 1 );
+ add_filter( 'plugin_action_links_' . plugin_basename( WPMS_PLUGIN_FILE ), [ $this, 'add_plugin_action_link' ], 10, 1 );
// Add the options page.
- add_action( 'admin_menu', array( $this, 'add_admin_options_page' ) );
+ add_action( 'admin_menu', [ $this, 'add_admin_options_page' ] );
+
+ // Register on load Email Log admin menu hook.
+ add_action( 'load-wp-mail-smtp_page_wp-mail-smtp-logs', [ $this, 'maybe_redirect_email_log_menu_to_email_log_settings_tab' ] );
// Admin footer text.
- add_filter( 'admin_footer_text', array( $this, 'get_admin_footer' ), 1, 2 );
+ add_filter( 'admin_footer_text', [ $this, 'get_admin_footer' ], 1, 2 );
// Enqueue admin area scripts and styles.
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );
+ add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] );
// Process the admin page forms actions.
- add_action( 'admin_init', array( $this, 'process_actions' ) );
+ add_action( 'admin_init', [ $this, 'process_actions' ] );
// Display custom notices based on the error/success codes.
- add_action( 'admin_init', array( $this, 'display_custom_auth_notices' ) );
+ add_action( 'admin_init', [ $this, 'display_custom_auth_notices' ] );
// Display notice instructing the user to complete plugin setup.
- add_action( 'admin_init', array( $this, 'display_setup_notice' ) );
+ add_action( 'admin_init', [ $this, 'display_setup_notice' ] );
// Outputs the plugin admin header.
- add_action( 'in_admin_header', array( $this, 'display_admin_header' ), 100 );
+ add_action( 'in_admin_header', [ $this, 'display_admin_header' ], 100 );
// Hide all unrelated to the plugin notices on the plugin admin pages.
- add_action( 'admin_print_scripts', array( $this, 'hide_unrelated_notices' ) );
+ add_action( 'admin_print_scripts', [ $this, 'hide_unrelated_notices' ] );
// Process all AJAX requests.
- add_action( 'wp_ajax_wp_mail_smtp_ajax', array( $this, 'process_ajax' ) );
+ add_action( 'wp_ajax_wp_mail_smtp_ajax', [ $this, 'process_ajax' ] );
+
+ ( new Review() )->hooks();
}
/**
@@ -107,8 +121,7 @@ class Area {
switch ( $error ) {
case 'google_access_denied':
- WP::add_admin_notice(
- /* translators: %s - error code, returned by Google API. */
+ WP::add_admin_notice( /* translators: %s - error code, returned by Google API. */
sprintf( esc_html__( 'There was an error while processing the authentication request: %s. Please try again.', 'wp-mail-smtp' ), '' . $error . '' ),
WP::ADMIN_NOTICE_ERROR
);
@@ -169,15 +182,14 @@ class Area {
// Display notice informing user further action is needed.
WP::add_admin_notice(
sprintf(
- wp_kses(
- /* translators: %s - Mailer anchor link. */
+ wp_kses( /* translators: %s - Mailer anchor link. */
__( 'Thanks for using WP Mail SMTP! To complete the plugin setup and start sending emails, please select and configure your Mailer.', 'wp-mail-smtp' ),
- array(
- 'a' => array(
- 'href' => array(),
- ),
- 'strong' => array(),
- )
+ [
+ 'a' => [
+ 'href' => [],
+ ],
+ 'strong' => [],
+ ]
),
wp_mail_smtp()->get_admin()->get_admin_page_url( self::SLUG . '#wp-mail-smtp-setting-row-mailer' )
),
@@ -232,6 +244,26 @@ class Area {
}
}
+ /**
+ * Redirect the "Email Log" WP menu link to the "Email Log" setting tab for lite version of the plugin.
+ *
+ * @since 2.1.0
+ */
+ public function maybe_redirect_email_log_menu_to_email_log_settings_tab() {
+
+ /**
+ * The Email Logs object to be used for loading the Email Log page.
+ *
+ * @var \WPMailSMTP\Admin\PageAbstract $logs
+ */
+ $logs = $this->generate_display_logs_object();
+
+ if ( $logs instanceof \WPMailSMTP\Admin\Pages\Logs ) {
+ wp_safe_redirect( $logs->get_link() );
+ exit;
+ }
+ }
+
/**
* Enqueue admin area scripts and styles.
*
@@ -269,6 +301,19 @@ class Area {
array(
'text_provider_remove' => esc_html__( 'Are you sure you want to reset the current provider connection? You will need to immediately create a new one to be able to send emails.', 'wp-mail-smtp' ),
'text_settings_not_saved' => esc_html__( 'Changes that you made to the settings are not saved!', 'wp-mail-smtp' ),
+ 'default_mailer_notice' => array(
+ 'title' => esc_html__( 'Heads up!', 'wp-mail-smtp' ),
+ 'content' => wp_kses(
+ __( '
The Default (PHP) mailer is currently selected, but is not recommended because in most cases it does not resolve email delivery issues.
Please consider selecting and configuring one of the other mailers.
', 'wp-mail-smtp' ),
+ array(
+ 'p' => true,
+ )
+ ),
+ 'save_button' => esc_html__( 'Save Settings', 'wp-mail-smtp' ),
+ 'cancel_button' => esc_html__( 'Cancel', 'wp-mail-smtp' ),
+ 'icon_alt' => esc_html__( 'Warning icon', 'wp-mail-smtp' ),
+ ),
+ 'plugin_url' => wp_mail_smtp()->plugin_url,
'education' => array(
'upgrade_icon_lock' => '',
'upgrade_title' => esc_html__( '%name% is a PRO Feature', 'wp-mail-smtp' ),
@@ -469,9 +514,12 @@ class Area {
break;
case self::SLUG . '-logs':
- $logs_class = apply_filters( 'wp_mail_smtp_admin_display_get_logs_fqcn', '\WPMailSMTP\Admin\Pages\Logs' );
- /** @var \WPMailSMTP\Admin\PageAbstract $logs */
- $logs = new $logs_class();
+ /**
+ * The Email Logs object to be used for loading the Email Log page.
+ *
+ * @var \WPMailSMTP\Admin\PageAbstract $logs
+ */
+ $logs = $this->generate_display_logs_object();
$is_archive = wp_mail_smtp()->is_pro() && wp_mail_smtp()->pro->get_logs()->is_archive();
?>
@@ -500,6 +548,20 @@ class Area {
get_label();
- }
-
- /**
- * @inheritdoc
- */
- public function display() {
-
- $features = array(
- array(
- 'image' => 'comments.png',
- 'title' => esc_html__( 'Comment Notifications', 'wp-mail-smtp' ),
- 'desc' => esc_html__( 'Manage emails sent when comments are published or awaiting moderation.', 'wp-mail-smtp' ),
- ),
- array(
- 'image' => 'admin.png',
- 'title' => esc_html__( 'Site Admin Email Change Notifications', 'wp-mail-smtp' ),
- 'desc' => esc_html__( 'Manage emails sent when site admin\'s account has been changed.', 'wp-mail-smtp' ),
- ),
- array(
- 'image' => 'users.png',
- 'title' => esc_html__( 'User Change Notifications', 'wp-mail-smtp' ),
- 'desc' => esc_html__( 'Limit emails triggered by password changed/reset, email changed, and more.', 'wp-mail-smtp' ),
- ),
- array(
- 'image' => 'personal.png',
- 'title' => esc_html__( 'Personal Data Requests Notifications', 'wp-mail-smtp' ),
- 'desc' => esc_html__( 'Control emails for data requests and data removal actions.', 'wp-mail-smtp' ),
- ),
- array(
- 'image' => 'update.png',
- 'title' => esc_html__( 'Automatic Update Notifications', 'wp-mail-smtp' ),
- 'desc' => esc_html__( 'Manage emails sent by the core automatic update process.', 'wp-mail-smtp' ),
- ),
- array(
- 'image' => 'user_new.png',
- 'title' => esc_html__( 'New User Notifications', 'wp-mail-smtp' ),
- 'desc' => esc_html__( 'Toggle emails sent to both user and site administrator about new user accounts.', 'wp-mail-smtp' ),
- ),
-
- )
- ?>
-
-
+
+ wp-config.php'
);
} else {
- printf( /* translators: %s - file to put that constant in. */
- esc_html__( 'If you want to enable this option using constants, put the lines below to your %s file:', 'wp-mail-smtp' ),
- 'wp-config.php'
+ printf(
+ wp_kses( /* translators: %s - The URL to the constants support article. */
+ __( 'Please read this support article if you want to enable this option using constants.', 'wp-mail-smtp' ),
+ [
+ 'a' => [
+ 'href' => [],
+ 'target' => [],
+ 'rel' => [],
+ ],
+ ]
+ ),
+ 'https://wpmailsmtp.com/docs/how-to-secure-smtp-settings-by-using-constants/'
);
}
?>
-
diff --git a/wp-content/plugins/wp-mail-smtp/src/Admin/Pages/TestTab.php b/wp-content/plugins/wp-mail-smtp/src/Admin/Pages/TestTab.php
index 1d3b1772..b5faa675 100644
--- a/wp-content/plugins/wp-mail-smtp/src/Admin/Pages/TestTab.php
+++ b/wp-content/plugins/wp-mail-smtp/src/Admin/Pages/TestTab.php
@@ -98,12 +98,12 @@ class TestTab extends PageAbstract {
$disabled = '';
$help_text = '';
- if (
- ! wp_mail_smtp()->get_providers()->get_mailer(
- Options::init()->get( 'mail', 'mailer' ),
- wp_mail_smtp()->get_processor()->get_phpmailer()
- )->is_mailer_complete()
- ) {
+ $mailer = wp_mail_smtp()->get_providers()->get_mailer(
+ Options::init()->get( 'mail', 'mailer' ),
+ wp_mail_smtp()->get_processor()->get_phpmailer()
+ );
+
+ if ( ! $mailer || ! $mailer->is_mailer_complete() ) {
$btn = 'wp-mail-smtp-btn-red';
$disabled = 'disabled';
@@ -435,6 +435,18 @@ Lead Developer, WP Mail SMTP';
$mailer_text .= $mailer->get_debug_info();
}
+ $phpmailer_error = $phpmailer->ErrorInfo; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
+
+ // Append any PHPMailer errors to the mailer debug (except SMTP mailer, which has the full error output below).
+ if (
+ ! empty( $phpmailer_error ) &&
+ ! $options->is_mailer_smtp()
+ ) {
+ $mailer_text .= '
PHPMailer Debug: ' .
+ wp_strip_all_tags( $phpmailer_error ) .
+ ' ';
+ }
+
/*
* General Debug.
*/
@@ -486,137 +498,163 @@ Lead Developer, WP Mail SMTP';
$smtp_port = $options->get( 'smtp', 'port' );
$smtp_encryption = $options->get( 'smtp', 'encryption' );
- $details = array(
+ $details = [
// [any] - cURL error 60/77.
- array(
+ [
'mailer' => 'any',
- 'errors' => array(
- array( 'cURL error 60' ),
- array( 'cURL error 77' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ 'cURL error 60' ],
+ [ 'cURL error 77' ],
+ ],
+ 'description' => [
'' . esc_html__( 'SSL certificate issue.', 'wp-mail-smtp' ) . '',
esc_html__( 'This means your web server cannot reliably make secure connections (make requests to HTTPS sites).', 'wp-mail-smtp' ),
esc_html__( 'Typically this error is returned when web server is not configured properly.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Contact your web hosting provider and inform them your site has an issue with SSL certificates.', 'wp-mail-smtp' ),
esc_html__( 'The exact error you can provide them is in the Error log, available at the bottom of this page.', 'wp-mail-smtp' ),
esc_html__( 'Ask them to resolve the issue then try again.', 'wp-mail-smtp' ),
- ),
- ),
+ ],
+ ],
// [any] - cURL error 6/7.
- array(
+ [
'mailer' => 'any',
- 'errors' => array(
- array( 'cURL error 6' ),
- array( 'cURL error 7' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ 'cURL error 6' ],
+ [ 'cURL error 7' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Could not connect to host.', 'wp-mail-smtp' ) . '',
! empty( $smtp_host )
- ? sprintf(
- /* translators: %s - SMTP host address. */
+ ? sprintf( /* translators: %s - SMTP host address. */
esc_html__( 'This means your web server was unable to connect to %s.', 'wp-mail-smtp' ),
$smtp_host
)
: esc_html__( 'This means your web server was unable to connect to the host server.', 'wp-mail-smtp' ),
esc_html__( 'Typically this error is returned your web server is blocking the connections or the SMTP host denying the request.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
- sprintf(
- /* translators: %s - SMTP host address. */
+ ],
+ 'steps' => [
+ sprintf( /* translators: %s - SMTP host address. */
esc_html__( 'Contact your web hosting provider and ask them to verify your server can connect to %s. Additionally, ask them if a firewall or security policy may be preventing the connection.', 'wp-mail-smtp' ),
$smtp_host
),
esc_html__( 'If using "Other SMTP" Mailer, triple check your SMTP settings including host address, email, and password.', 'wp-mail-smtp' ),
esc_html__( 'If using "Other SMTP" Mailer, contact your SMTP host to confirm they are accepting outside connections with the settings you have configured (address, username, port, security, etc).', 'wp-mail-smtp' ),
- ),
- ),
+ ],
+ ],
// [any] - cURL error XX (other).
- array(
+ [
'mailer' => 'any',
- 'errors' => array(
- array( 'cURL error' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ 'cURL error' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Could not connect to your host.', 'wp-mail-smtp' ) . '',
! empty( $smtp_host )
- ? sprintf(
- /* translators: %s - SMTP host address. */
+ ? sprintf( /* translators: %s - SMTP host address. */
esc_html__( 'This means your web server was unable to connect to %s.', 'wp-mail-smtp' ),
$smtp_host
)
: esc_html__( 'This means your web server was unable to connect to the host server.', 'wp-mail-smtp' ),
esc_html__( 'Typically this error is returned when web server is not configured properly.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Contact your web hosting provider and inform them you are having issues making outbound connections.', 'wp-mail-smtp' ),
esc_html__( 'The exact error you can provide them is in the Error log, available at the bottom of this page.', 'wp-mail-smtp' ),
esc_html__( 'Ask them to resolve the issue then try again.', 'wp-mail-smtp' ),
- ),
- ),
+ ],
+ ],
// [smtp] - SMTP Error: Count not authenticate.
- array(
+ [
'mailer' => 'smtp',
- 'errors' => array(
- array( 'SMTP Error: Could not authenticate.' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ 'SMTP Error: Could not authenticate.' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Could not authenticate your SMTP account.', 'wp-mail-smtp' ) . '',
esc_html__( 'This means we were able to connect to your SMTP host, but were not able to proceed using the email/password in the settings.', 'wp-mail-smtp' ),
esc_html__( 'Typically this error is returned when the email or password is not correct or is not what the SMTP host is expecting.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Triple check your SMTP settings including host address, email, and password. If you have recently reset your password you will need to update the settings.', 'wp-mail-smtp' ),
esc_html__( 'Contact your SMTP host to confirm you are using the correct username and password.', 'wp-mail-smtp' ),
esc_html__( 'Verify with your SMTP host that your account has permissions to send emails using outside connections.', 'wp-mail-smtp' ),
- ),
- ),
+ ],
+ ],
// [smtp] - Sending bulk email, hitting rate limit.
- array(
+ [
'mailer' => 'smtp',
- 'errors' => array(
- array( 'We do not authorize the use of this system to transport unsolicited' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ 'We do not authorize the use of this system to transport unsolicited' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Error due to unsolicited and/or bulk e-mail.', 'wp-mail-smtp' ) . '',
esc_html__( 'This means the connection to your SMTP host was made successfully, but the host rejected the email.', 'wp-mail-smtp' ),
esc_html__( 'Typically this error is returned when you are sending too many e-mails or e-mails that have been identified as spam.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Check the emails that are sending are sending individually. Example: email is not sending to 30 recipients. You can install any WordPress e-mail logging plugin to do that.', 'wp-mail-smtp' ),
esc_html__( 'Contact your SMTP host to ask about sending/rate limits.', 'wp-mail-smtp' ),
esc_html__( 'Verify with them your SMTP account is in good standing and your account has not been flagged.', 'wp-mail-smtp' ),
- ),
- ),
+ ],
+ ],
// [smtp] - Unauthenticated senders not allowed.
- array(
+ [
'mailer' => 'smtp',
- 'errors' => array(
- array( 'Unauthenticated senders not allowed' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ 'Unauthenticated senders not allowed' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Unauthenticated senders are not allowed.', 'wp-mail-smtp' ) . '',
esc_html__( 'This means the connection to your SMTP host was made successfully, but you should enable Authentication and provide correct Username and Password.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Go to WP Mail SMTP plugin Settings page.', 'wp-mail-smtp' ),
esc_html__( 'Enable Authentication', 'wp-mail-smtp' ),
esc_html__( 'Enter correct SMTP Username (usually this is an email address) and Password in the appropriate fields.', 'wp-mail-smtp' ),
- ),
- ),
- // [smtp] - SMTP connect() failed.
- array(
+ ],
+ ],
+ // [smtp] - certificate verify failed.
+ // Has to be defined before "SMTP connect() failed" error, since this is a more specific error,
+ // which contains the "SMTP connect() failed" error message as well.
+ [
'mailer' => 'smtp',
- 'errors' => array(
- array( 'SMTP connect() failed' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ 'certificate verify failed' ],
+ ],
+ 'description' => [
+ '' . esc_html__( 'Misconfigured server certificate.', 'wp-mail-smtp' ) . '',
+ esc_html__( 'This means OpenSSL on your server isn\'t able to verify the host certificate.', 'wp-mail-smtp' ),
+ esc_html__( 'There are a few reasons why this is happening. It could be that the host certificate is misconfigured, or this server\'s OpenSSL is using an outdated CA bundle.', 'wp-mail-smtp' ),
+ ],
+ 'steps' => [
+ esc_html__( 'Verify that the host\'s SSL certificate is valid.', 'wp-mail-smtp' ),
+ sprintf(
+ wp_kses( /* translators: %s - URL to the PHP openssl manual */
+ __( 'Contact your hosting support, show them the "full Error Log for debugging" below and share this link with them.', 'wp-mail-smtp' ),
+ [
+ 'a' => [
+ 'href' => [],
+ 'target' => [],
+ 'rel' => [],
+ ],
+ ]
+ ),
+ 'https://www.php.net/manual/en/migration56.openssl.php'
+ ),
+ ],
+ ],
+ // [smtp] - SMTP connect() failed.
+ [
+ 'mailer' => 'smtp',
+ 'errors' => [
+ [ 'SMTP connect() failed' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Could not connect to the SMTP host.', 'wp-mail-smtp' ) . '',
! empty( $smtp_host )
- ? sprintf(
- /* translators: %s - SMTP host address. */
+ ? sprintf( /* translators: %s - SMTP host address. */
esc_html__( 'This means your web server was unable to connect to %s.', 'wp-mail-smtp' ),
$smtp_host
)
@@ -625,22 +663,21 @@ Lead Developer, WP Mail SMTP';
'-' . esc_html__( 'SMTP settings are incorrect (wrong port, security setting, incorrect host).', 'wp-mail-smtp' ) . ' ' .
'-' . esc_html__( 'Your web server is blocking the connection.', 'wp-mail-smtp' ) . ' ' .
'-' . esc_html__( 'Your SMTP host is rejecting the connection.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Triple check your SMTP settings including host address, email, and password, port, and security.', 'wp-mail-smtp' ),
sprintf(
- wp_kses(
- /* translators: %1$s - SMTP host address, %2$s - SMTP port, %3$s - SMTP encryption. */
+ wp_kses( /* translators: %1$s - SMTP host address, %2$s - SMTP port, %3$s - SMTP encryption. */
__( 'Contact your web hosting provider and ask them to verify your server can connect to %1$s on port %2$s using %3$s encryption. Additionally, ask them if a firewall or security policy may be preventing the connection - many shared hosts block certain ports. Note: this is the most common cause of this issue.', 'wp-mail-smtp' ),
- array(
- 'a' => array(
- 'href' => array(),
- 'rel' => array(),
- 'target' => array(),
- ),
- 'strong' => array(),
- 'br' => array(),
- )
+ [
+ 'a' => [
+ 'href' => [],
+ 'rel' => [],
+ 'target' => [],
+ ],
+ 'strong' => [],
+ 'br' => [],
+ ]
),
$smtp_host,
$smtp_port,
@@ -648,281 +685,332 @@ Lead Developer, WP Mail SMTP';
),
esc_html__( 'Contact your SMTP host to confirm you are using the correct username and password.', 'wp-mail-smtp' ),
esc_html__( 'Verify with your SMTP host that your account has permissions to send emails using outside connections.', 'wp-mail-smtp' ),
- ),
- ),
+ ],
+ ],
// [mailgun] - Please activate your Mailgun account.
- array(
+ [
'mailer' => 'mailgun',
- 'errors' => array(
- array( 'Please activate your Mailgun account' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ 'Please activate your Mailgun account' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Mailgun failed.', 'wp-mail-smtp' ) . '',
esc_html__( 'It seems that you forgot to activate your Mailgun account.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Check your inbox you used to create a Mailgun account. Click the activation link in an email from Mailgun.', 'wp-mail-smtp' ),
esc_html__( 'If you do not see activation email, go to your Mailgun control panel and resend the activation email.', 'wp-mail-smtp' ),
- ),
- ),
+ ],
+ ],
// [mailgun] - Forbidden.
- array(
+ [
'mailer' => 'mailgun',
- 'errors' => array(
- array( 'Forbidden' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ 'Forbidden' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Mailgun failed.', 'wp-mail-smtp' ) . '',
esc_html__( 'Typically this error is because there is an issue with your Mailgun settings, in many cases the API key.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Verify your API key is correct.', 'wp-mail-smtp' ),
esc_html__( 'Go to your Mailgun account and view your API key.', 'wp-mail-smtp' ),
esc_html__( 'Note that the API key includes the "key" prefix, so make sure that it is in the WP Mail SMTP Mailgun API setting.', 'wp-mail-smtp' ),
- ),
- ),
+ ],
+ ],
// [mailgun] - Free accounts are for test purposes only.
- array(
+ [
'mailer' => 'mailgun',
- 'errors' => array(
- array( 'Free accounts are for test purposes only' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ 'Free accounts are for test purposes only' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Mailgun failed.', 'wp-mail-smtp' ) . '',
esc_html__( 'Your Mailgun account does not have access to send emails.', 'wp-mail-smtp' ),
esc_html__( 'Typically this error is because you have not set up and/or complete domain name verification for your Mailgun account.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
sprintf(
- wp_kses(
- /* translators: %s - Mailgun documentation URL. */
+ wp_kses( /* translators: %s - Mailgun documentation URL. */
__( 'Go to our how-to guide for setting up Mailgun with WP Mail SMTP.', 'wp-mail-smtp' ),
- array(
- 'a' => array(
- 'href' => array(),
- 'rel' => array(),
- 'target' => array(),
- ),
- )
+ [
+ 'a' => [
+ 'href' => [],
+ 'rel' => [],
+ 'target' => [],
+ ],
+ ]
),
'https://wpmailsmtp.com/docs/how-to-set-up-the-mailgun-mailer-in-wp-mail-smtp/'
),
esc_html__( 'Complete the steps in section "2. Verify Your Domain".', 'wp-mail-smtp' ),
- ),
- ),
+ ],
+ ],
// [gmail] - 401: Login Required.
- array(
+ [
'mailer' => 'gmail',
- 'errors' => array(
- array( '401', 'Login Required' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ '401', 'Login Required' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '',
esc_html__( 'You have not properly configured Gmail mailer.', 'wp-mail-smtp' ),
esc_html__( 'Make sure that you have clicked the "Allow plugin to send emails using your Google account" button under Gmail settings.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Go to plugin Settings page and click the "Allow plugin to send emails using your Google account" button.', 'wp-mail-smtp' ),
esc_html__( 'After the click you should be redirected to a Gmail authorization screen, where you will be asked a permission to send emails on your behalf.', 'wp-mail-smtp' ),
esc_html__( 'Please click "Agree", if you see that button. If not - you will need to enable less secure apps first:', 'wp-mail-smtp' )
. '
' .
sprintf(
- wp_kses(
- /* translators: %s - Google support article URL. */
+ wp_kses( /* translators: %s - Google support article URL. */
__( 'if you are using G Suite, please read this article to proceed.', 'wp-mail-smtp' ),
- array(
- 'a' => array(
- 'href' => array(),
- 'target' => array(),
- 'rel' => array(),
- ),
- )
+ [
+ 'a' => [
+ 'href' => [],
+ 'target' => [],
+ 'rel' => [],
+ ],
+ ]
),
'https://support.google.com/cloudidentity/answer/6260879?hl=en'
)
. '
'
. '
',
- ),
- ),
+ ],
+ ],
// [gmail] - 400: Recipient address required.
- array(
+ [
'mailer' => 'gmail',
- 'errors' => array(
- array( '400', 'Recipient address required' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ '400', 'Recipient address required' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '',
esc_html__( 'Typically this error is because address the email was sent to is invalid or was empty.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Check the "Send To" email address used and confirm it is a valid email and was not empty.', 'wp-mail-smtp' ),
- sprintf(
- /* translators: 1 - correct email address example. 2 - incorrect email address example. */
+ sprintf( /* translators: 1 - correct email address example. 2 - incorrect email address example. */
esc_html__( 'It should be something like this: %1$s. These are incorrect values: %2$s.', 'wp-mail-smtp' ),
'info@example.com',
'info@localhost, info@192.168.1.1'
),
esc_html__( 'Make sure that the generated email has a TO header, useful when you are responsible for email creation.', 'wp-mail-smtp' ),
- ),
- ),
+ ],
+ ],
// [gmail] - Token has been expired or revoked.
- array(
+ [
'mailer' => 'gmail',
- 'errors' => array(
- array( 'invalid_grant', 'Token has been expired or revoked' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ 'invalid_grant', 'Token has been expired or revoked' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '',
esc_html__( 'Unfortunately, this error can be due to many different reasons.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
sprintf(
- wp_kses(
- /* translators: %s - Blog article URL. */
+ wp_kses( /* translators: %s - Blog article URL. */
__( 'Please read this article to learn more about what can cause this error and how it can be resolved.', 'wp-mail-smtp' ),
- array(
- 'a' => array(
- 'href' => array(),
- 'target' => array(),
- 'rel' => array(),
- ),
- )
+ [
+ 'a' => [
+ 'href' => [],
+ 'target' => [],
+ 'rel' => [],
+ ],
+ ]
),
'https://blog.timekit.io/google-oauth-invalid-grant-nightmare-and-how-to-fix-it-9f4efaf1da35'
),
- ),
- ),
+ ],
+ ],
// [gmail] - Code was already redeemed.
- array(
+ [
'mailer' => 'gmail',
- 'errors' => array(
- array( 'invalid_grant', 'Code was already redeemed' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ 'invalid_grant', 'Code was already redeemed' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '',
esc_html__( 'Authentication code that Google returned to you has already been used on your previous auth attempt.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Make sure that you are not trying to manually clean up the plugin options to retry the "Allow..." step.', 'wp-mail-smtp' ),
esc_html__( 'Reinstall the plugin with clean plugin data turned on on Misc page. This will remove all the plugin options and you will be safe to retry.', 'wp-mail-smtp' ),
esc_html__( 'Make sure there is no aggressive caching on site admin area pages or try to clean cache between attempts.', 'wp-mail-smtp' ),
- ),
- ),
+ ],
+ ],
// [gmail] - 400: Mail service not enabled.
- array(
+ [
'mailer' => 'gmail',
- 'errors' => array(
- array( '400', 'Mail service not enabled' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ '400', 'Mail service not enabled' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '',
esc_html__( 'There are various reasons for that, please review the steps below.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
sprintf(
- wp_kses(
- /* translators: %s - Google G Suite Admin area URL. */
+ wp_kses( /* translators: %s - Google G Suite Admin area URL. */
__( 'Make sure that your G Suite trial period has not expired. You can check the status here.', 'wp-mail-smtp' ),
- array(
- 'a' => array(
- 'href' => array(),
- 'rel' => array(),
- 'target' => array(),
- ),
- )
+ [
+ 'a' => [
+ 'href' => [],
+ 'rel' => [],
+ 'target' => [],
+ ],
+ ]
),
'https://admin.google.com'
),
sprintf(
- wp_kses(
- /* translators: %s - Google G Suite Admin area URL. */
+ wp_kses( /* translators: %s - Google G Suite Admin area URL. */
__( 'Make sure that Gmail app in your G Suite is actually enabled. You can check that in Apps list in G Suite Admin area.', 'wp-mail-smtp' ),
- array(
- 'a' => array(
- 'href' => array(),
- 'rel' => array(),
- 'target' => array(),
- ),
- )
+ [
+ 'a' => [
+ 'href' => [],
+ 'rel' => [],
+ 'target' => [],
+ ],
+ ]
),
'https://admin.google.com'
),
sprintf(
- wp_kses(
- /* translators: %s - Google Developers Console URL. */
+ wp_kses( /* translators: %s - Google Developers Console URL. */
__( 'Make sure that you have Gmail API enabled, and you can do that here.', 'wp-mail-smtp' ),
- array(
- 'a' => array(
- 'href' => array(),
- 'rel' => array(),
- 'target' => array(),
- ),
- )
+ [
+ 'a' => [
+ 'href' => [],
+ 'rel' => [],
+ 'target' => [],
+ ],
+ ]
),
'https://console.developers.google.com/'
),
- ),
- ),
+ ],
+ ],
// [gmail] - 403: Project X is not found and cannot be used for API calls.
- array(
+ [
'mailer' => 'gmail',
- 'errors' => array(
- array( '403', 'is not found and cannot be used for API calls' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ '403', 'is not found and cannot be used for API calls' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '',
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Make sure that the used Client ID/Secret correspond to a proper project that has Gmail API enabled.', 'wp-mail-smtp' ),
sprintf(
- wp_kses(
- /* translators: %s - Gmail documentation URL. */
+ wp_kses( /* translators: %s - Gmail documentation URL. */
esc_html__( 'Please follow our Gmail tutorial to be sure that all the correct project and data is applied.', 'wp-mail-smtp' ),
- array(
- 'a' => array(
- 'href' => array(),
- 'rel' => array(),
- 'target' => array(),
- ),
- )
+ [
+ 'a' => [
+ 'href' => [],
+ 'rel' => [],
+ 'target' => [],
+ ],
+ ]
),
'https://wpmailsmtp.com/docs/how-to-set-up-the-gmail-mailer-in-wp-mail-smtp/'
),
- ),
- ),
+ ],
+ ],
// [gmail] - The OAuth client was disabled.
- array(
+ [
'mailer' => 'gmail',
- 'errors' => array(
- array( 'disabled_client', 'The OAuth client was disabled' ),
- ),
- 'description' => array(
+ 'errors' => [
+ [ 'disabled_client', 'The OAuth client was disabled' ],
+ ],
+ 'description' => [
'' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '',
esc_html__( 'You may have added a new API to a project', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Make sure that the used Client ID/Secret correspond to a proper project that has Gmail API enabled.', 'wp-mail-smtp' ),
esc_html__( 'Try to use a separate project for your emails, so the project has only 1 Gmail API in it enabled. You will need to remove the old project and create a new one from scratch.', 'wp-mail-smtp' ),
- ),
- ),
- );
+ ],
+ ],
+ // [SMTP.com] - The "channel - not found" issue.
+ [
+ 'mailer' => 'smtpcom',
+ 'errors' => [
+ [ 'channel - not found' ],
+ ],
+ 'description' => [
+ '' . esc_html__( 'SMTP.com API Error.', 'wp-mail-smtp' ) . '',
+ esc_html__( 'Your Sender Name option is incorrect.', 'wp-mail-smtp' ),
+ ],
+ 'steps' => [
+ esc_html__( 'Please make sure you entered an accurate Sender Name in WP Mail SMTP plugin settings.', 'wp-mail-smtp' ),
+ ],
+ ],
+ // [gmail] - GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.
+ [
+ 'mailer' => 'gmail',
+ 'errors' => [
+ [ 'GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler' ],
+ ],
+ 'description' => [
+ '' . esc_html__( 'GuzzleHttp requirements.', 'wp-mail-smtp' ) . '',
+ esc_html__( 'GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.', 'wp-mail-smtp' ),
+ ],
+ 'steps' => [
+ esc_html__( 'Edit your php.ini file on your hosting server.', 'wp-mail-smtp' ),
+ esc_html__( '(Recommended) Enable PHP extension: cURL, by adding "extension=curl" to the php.ini file (without the quotation marks) OR', 'wp-mail-smtp' ),
+ esc_html__( '(If cURL can\'t be enabled on your hosting server) Enable PHP setting: allow_url_fopen, by adding "allow_url_fopen = On" to the php.ini file (without the quotation marks)', 'wp-mail-smtp' ),
+ esc_html__( 'If you don\'t know how to do the above we strongly suggest contacting your hosting support and provide them the "full Error Log for debugging" below and these steps. They should be able to fix this issue for you.', 'wp-mail-smtp' ),
+ ],
+ ],
+ ];
+
+ /**
+ * [any] - PHP 7.4.x and PCRE library issues.
+ *
+ * @see https://wordpress.org/support/topic/cant-send-emails-using-php-7-4/
+ */
+ if (
+ version_compare( phpversion(), '7.4', '>=' ) &&
+ defined( 'PCRE_VERSION' ) &&
+ version_compare( PCRE_VERSION, '10.0', '>' ) &&
+ version_compare( PCRE_VERSION, '10.32', '<=' )
+ ) {
+ $details[] = [
+ 'mailer' => 'any',
+ 'errors' => [
+ [ 'Invalid address: (setFrom)' ],
+ ],
+ 'description' => [
+ '' . esc_html__( 'PCRE library issue', 'wp-mail-smtp' ) . '',
+ esc_html__( 'It looks like your server is running PHP version 7.4.x with an outdated PCRE library (libpcre2) that has a known issue with email address validation.', 'wp-mail-smtp' ),
+ esc_html__( 'There is a known issue with PHP version 7.4.x, when using libpcre2 library version lower than 10.33.', 'wp-mail-smtp' ),
+ ],
+ 'steps' => [
+ esc_html__( 'Contact your web hosting provider and inform them you are having issues with libpcre2 library on PHP 7.4.', 'wp-mail-smtp' ),
+ esc_html__( 'They should be able to resolve this issue for you.', 'wp-mail-smtp' ),
+ esc_html__( 'For a quick fix, until your web hosting resolves this, you can downgrade to PHP version 7.3 on your server.', 'wp-mail-smtp' ),
+ ],
+ ];
+ }
// Error detection logic.
foreach ( $details as $data ) {
@@ -953,27 +1041,27 @@ Lead Developer, WP Mail SMTP';
}
// Return defaults.
- return array(
- 'description' => array(
+ return [
+ 'description' => [
'' . esc_html__( 'An issue was detected.', 'wp-mail-smtp' ) . '',
esc_html__( 'This means your test email was unable to be sent.', 'wp-mail-smtp' ),
esc_html__( 'Typically this error is returned for one of the following reasons:', 'wp-mail-smtp' ),
'- ' . esc_html__( 'Plugin settings are incorrect (wrong SMTP settings, invalid Mailer configuration, etc).', 'wp-mail-smtp' ) . ' ' .
'- ' . esc_html__( 'Your web server is blocking the connection.', 'wp-mail-smtp' ) . ' ' .
'- ' . esc_html__( 'Your host is rejecting the connection.', 'wp-mail-smtp' ),
- ),
- 'steps' => array(
+ ],
+ 'steps' => [
esc_html__( 'Triple check the plugin settings, consider reconfiguring to make sure everything is correct (eg bad copy and paste).', 'wp-mail-smtp' ),
wp_kses(
__( 'Contact your web hosting provider and ask them to verify your server can make outside connections. Additionally, ask them if a firewall or security policy may be preventing the connection - many shared hosts block certain ports. Note: this is the most common cause of this issue.', 'wp-mail-smtp' ),
- array(
- 'strong' => array(),
- 'br' => array(),
- )
+ [
+ 'strong' => [],
+ 'br' => [],
+ ]
),
esc_html__( 'Try using a different mailer.', 'wp-mail-smtp' ),
- ),
- );
+ ],
+ ];
}
/**
diff --git a/wp-content/plugins/wp-mail-smtp/src/Admin/Review.php b/wp-content/plugins/wp-mail-smtp/src/Admin/Review.php
new file mode 100644
index 00000000..fecd037e
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/src/Admin/Review.php
@@ -0,0 +1,203 @@
+ $time,
+ 'dismissed' => false,
+ ];
+ update_option( self::NOTICE_OPTION, $review );
+ } else {
+ // Check if it has been dismissed or not.
+ if ( isset( $review['dismissed'] ) && ! $review['dismissed'] ) {
+ $load = true;
+ }
+ }
+
+ // If we cannot load, return early.
+ if ( ! $load ) {
+ return;
+ }
+
+ $this->review();
+ }
+
+ /**
+ * Maybe show review request.
+ *
+ * @since 2.1.0
+ */
+ private function review() {
+
+ // Get the currently selected mailer.
+ $mailer = Options::init()->get( 'mail', 'mailer' );
+
+ // Skip if the default mailer is selected.
+ if ( $mailer === 'mail' ) {
+ return;
+ }
+
+ // Fetch when plugin was initially activated.
+ $activated = get_option( 'wp_mail_smtp_activated_time' );
+
+ // Skip if the plugin activated time is not set.
+ if ( empty( $activated ) ) {
+ return;
+ }
+
+ // Check if mailer setup is complete.
+ $mailer_setup_complete = wp_mail_smtp()
+ ->get_providers()
+ ->get_mailer( $mailer, wp_mail_smtp()->get_processor()->get_phpmailer() )
+ ->is_mailer_complete();
+
+ // Skip if the mailer is not set or the plugin is active for less then a defined number of days.
+ if ( ! $mailer_setup_complete || ( $activated + ( DAY_IN_SECONDS * self::WAIT_PERIOD ) ) > time() ) {
+ return;
+ }
+
+ // We have a candidate! Output a review message.
+ ?>
+
' .
+ __( 'Action Scheduler is a scalable, traceable job queue for background processing large sets of actions. Action Scheduler works by triggering an action hook to run at some time in the future. Scheduled actions can also be scheduled to run on a recurring schedule.', 'action-scheduler' ) .
+ '
';
+
+ return apply_filters( 'action_scheduler_list_table_column_args', $row_html, $row );
+ }
+
+ /**
+ * Prints the logs entries inline. We do so to avoid loading Javascript and other hacks to show it in a modal.
+ *
+ * @param array $row Action array.
+ * @return string
+ */
+ public function column_log_entries( array $row ) {
+
+ $log_entries_html = '';
+
+ $timezone = new DateTimezone( 'UTC' );
+
+ foreach ( $row['log_entries'] as $log_entry ) {
+ $log_entries_html .= $this->get_log_entry_html( $log_entry, $timezone );
+ }
+
+ $log_entries_html .= '';
+
+ return $log_entries_html;
+ }
+
+ /**
+ * Prints the logs entries inline. We do so to avoid loading Javascript and other hacks to show it in a modal.
+ *
+ * @param ActionScheduler_LogEntry $log_entry
+ * @param DateTimezone $timezone
+ * @return string
+ */
+ protected function get_log_entry_html( ActionScheduler_LogEntry $log_entry, DateTimezone $timezone ) {
+ $date = $log_entry->get_date();
+ $date->setTimezone( $timezone );
+ return sprintf( '
%s %s
', esc_html( $date->format( 'Y-m-d H:i:s O' ) ), esc_html( $log_entry->get_message() ) );
+ }
+
+ /**
+ * Only display row actions for pending actions.
+ *
+ * @param array $row Row to render
+ * @param string $column_name Current row
+ *
+ * @return string
+ */
+ protected function maybe_render_actions( $row, $column_name ) {
+ if ( 'pending' === strtolower( $row[ 'status_name' ] ) ) {
+ return parent::maybe_render_actions( $row, $column_name );
+ }
+
+ return '';
+ }
+
+ /**
+ * Renders admin notifications
+ *
+ * Notifications:
+ * 1. When the maximum number of tasks are being executed simultaneously.
+ * 2. Notifications when a task is manually executed.
+ * 3. Tables are missing.
+ */
+ public function display_admin_notices() {
+ global $wpdb;
+
+ if ( ( is_a( $this->store, 'ActionScheduler_HybridStore' ) || is_a( $this->store, 'ActionScheduler_DBStore' ) ) && apply_filters( 'action_scheduler_enable_recreate_data_store', true ) ) {
+ $table_list = array(
+ 'actionscheduler_actions',
+ 'actionscheduler_logs',
+ 'actionscheduler_groups',
+ 'actionscheduler_claims',
+ );
+
+ $found_tables = $wpdb->get_col( "SHOW TABLES LIKE '{$wpdb->prefix}actionscheduler%'" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
+ foreach ( $table_list as $table_name ) {
+ if ( ! in_array( $wpdb->prefix . $table_name, $found_tables ) ) {
+ $this->admin_notices[] = array(
+ 'class' => 'error',
+ 'message' => __( 'It appears one or more database tables were missing. Attempting to re-create the missing table(s).' , 'action-scheduler' ),
+ );
+ $this->recreate_tables();
+ parent::display_admin_notices();
+
+ return;
+ }
+ }
+ }
+
+ if ( $this->runner->has_maximum_concurrent_batches() ) {
+ $claim_count = $this->store->get_claim_count();
+ $this->admin_notices[] = array(
+ 'class' => 'updated',
+ 'message' => sprintf(
+ /* translators: %s: amount of claims */
+ _n(
+ 'Maximum simultaneous queues already in progress (%s queue). No additional queues will begin processing until the current queues are complete.',
+ 'Maximum simultaneous queues already in progress (%s queues). No additional queues will begin processing until the current queues are complete.',
+ $claim_count,
+ 'action-scheduler'
+ ),
+ $claim_count
+ ),
+ );
+ } elseif ( $this->store->has_pending_actions_due() ) {
+
+ $async_request_lock_expiration = ActionScheduler::lock()->get_expiration( 'async-request-runner' );
+
+ // No lock set or lock expired
+ if ( false === $async_request_lock_expiration || $async_request_lock_expiration < time() ) {
+ $in_progress_url = add_query_arg( 'status', 'in-progress', remove_query_arg( 'status' ) );
+ /* translators: %s: process URL */
+ $async_request_message = sprintf( __( 'A new queue has begun processing. View actions in-progress »', 'action-scheduler' ), esc_url( $in_progress_url ) );
+ } else {
+ /* translators: %d: seconds */
+ $async_request_message = sprintf( __( 'The next queue will begin processing in approximately %d seconds.', 'action-scheduler' ), $async_request_lock_expiration - time() );
+ }
+
+ $this->admin_notices[] = array(
+ 'class' => 'notice notice-info',
+ 'message' => $async_request_message,
+ );
+ }
+
+ $notification = get_transient( 'action_scheduler_admin_notice' );
+
+ if ( is_array( $notification ) ) {
+ delete_transient( 'action_scheduler_admin_notice' );
+
+ $action = $this->store->fetch_action( $notification['action_id'] );
+ $action_hook_html = '' . $action->get_hook() . '';
+ if ( 1 == $notification['success'] ) {
+ $class = 'updated';
+ switch ( $notification['row_action_type'] ) {
+ case 'run' :
+ /* translators: %s: action HTML */
+ $action_message_html = sprintf( __( 'Successfully executed action: %s', 'action-scheduler' ), $action_hook_html );
+ break;
+ case 'cancel' :
+ /* translators: %s: action HTML */
+ $action_message_html = sprintf( __( 'Successfully canceled action: %s', 'action-scheduler' ), $action_hook_html );
+ break;
+ default :
+ /* translators: %s: action HTML */
+ $action_message_html = sprintf( __( 'Successfully processed change for action: %s', 'action-scheduler' ), $action_hook_html );
+ break;
+ }
+ } else {
+ $class = 'error';
+ /* translators: 1: action HTML 2: action ID 3: error message */
+ $action_message_html = sprintf( __( 'Could not process change for action: "%1$s" (ID: %2$d). Error: %3$s', 'action-scheduler' ), $action_hook_html, esc_html( $notification['action_id'] ), esc_html( $notification['error_message'] ) );
+ }
+
+ $action_message_html = apply_filters( 'action_scheduler_admin_notice_html', $action_message_html, $action, $notification );
+
+ $this->admin_notices[] = array(
+ 'class' => $class,
+ 'message' => $action_message_html,
+ );
+ }
+
+ parent::display_admin_notices();
+ }
+
+ /**
+ * Prints the scheduled date in a human friendly format.
+ *
+ * @param array $row The array representation of the current row of the table
+ *
+ * @return string
+ */
+ public function column_schedule( $row ) {
+ return $this->get_schedule_display_string( $row['schedule'] );
+ }
+
+ /**
+ * Get the scheduled date in a human friendly format.
+ *
+ * @param ActionScheduler_Schedule $schedule
+ * @return string
+ */
+ protected function get_schedule_display_string( ActionScheduler_Schedule $schedule ) {
+
+ $schedule_display_string = '';
+
+ if ( ! $schedule->get_date() ) {
+ return '0000-00-00 00:00:00';
+ }
+
+ $next_timestamp = $schedule->get_date()->getTimestamp();
+
+ $schedule_display_string .= $schedule->get_date()->format( 'Y-m-d H:i:s O' );
+ $schedule_display_string .= ' ';
+
+ if ( gmdate( 'U' ) > $next_timestamp ) {
+ /* translators: %s: date interval */
+ $schedule_display_string .= sprintf( __( ' (%s ago)', 'action-scheduler' ), self::human_interval( gmdate( 'U' ) - $next_timestamp ) );
+ } else {
+ /* translators: %s: date interval */
+ $schedule_display_string .= sprintf( __( ' (%s)', 'action-scheduler' ), self::human_interval( $next_timestamp - gmdate( 'U' ) ) );
+ }
+
+ return $schedule_display_string;
+ }
+
+ /**
+ * Bulk delete
+ *
+ * Deletes actions based on their ID. This is the handler for the bulk delete. It assumes the data
+ * properly validated by the callee and it will delete the actions without any extra validation.
+ *
+ * @param array $ids
+ * @param string $ids_sql Inherited and unused
+ */
+ protected function bulk_delete( array $ids, $ids_sql ) {
+ foreach ( $ids as $id ) {
+ $this->store->delete_action( $id );
+ }
+ }
+
+ /**
+ * Implements the logic behind running an action. ActionScheduler_Abstract_ListTable validates the request and their
+ * parameters are valid.
+ *
+ * @param int $action_id
+ */
+ protected function row_action_cancel( $action_id ) {
+ $this->process_row_action( $action_id, 'cancel' );
+ }
+
+ /**
+ * Implements the logic behind running an action. ActionScheduler_Abstract_ListTable validates the request and their
+ * parameters are valid.
+ *
+ * @param int $action_id
+ */
+ protected function row_action_run( $action_id ) {
+ $this->process_row_action( $action_id, 'run' );
+ }
+
+ /**
+ * Force the data store schema updates.
+ */
+ protected function recreate_tables() {
+ if ( is_a( $this->store, 'ActionScheduler_HybridStore' ) ) {
+ $store = $this->store;
+ } else {
+ $store = new ActionScheduler_HybridStore();
+ }
+ add_action( 'action_scheduler/created_table', array( $store, 'set_autoincrement' ), 10, 2 );
+
+ $store_schema = new ActionScheduler_StoreSchema();
+ $logger_schema = new ActionScheduler_LoggerSchema();
+ $store_schema->register_tables( true );
+ $logger_schema->register_tables( true );
+
+ remove_action( 'action_scheduler/created_table', array( $store, 'set_autoincrement' ), 10 );
+ }
+ /**
+ * Implements the logic behind processing an action once an action link is clicked on the list table.
+ *
+ * @param int $action_id
+ * @param string $row_action_type The type of action to perform on the action.
+ */
+ protected function process_row_action( $action_id, $row_action_type ) {
+ try {
+ switch ( $row_action_type ) {
+ case 'run' :
+ $this->runner->process_action( $action_id, 'Admin List Table' );
+ break;
+ case 'cancel' :
+ $this->store->cancel_action( $action_id );
+ break;
+ }
+ $success = 1;
+ $error_message = '';
+ } catch ( Exception $e ) {
+ $success = 0;
+ $error_message = $e->getMessage();
+ }
+
+ set_transient( 'action_scheduler_admin_notice', compact( 'action_id', 'success', 'error_message', 'row_action_type' ), 30 );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function prepare_items() {
+ $this->prepare_column_headers();
+
+ $per_page = $this->get_items_per_page( $this->package . '_items_per_page', $this->items_per_page );
+ $query = array(
+ 'per_page' => $per_page,
+ 'offset' => $this->get_items_offset(),
+ 'status' => $this->get_request_status(),
+ 'orderby' => $this->get_request_orderby(),
+ 'order' => $this->get_request_order(),
+ 'search' => $this->get_request_search_query(),
+ );
+
+ $this->items = array();
+
+ $total_items = $this->store->query_actions( $query, 'count' );
+
+ $status_labels = $this->store->get_status_labels();
+
+ foreach ( $this->store->query_actions( $query ) as $action_id ) {
+ try {
+ $action = $this->store->fetch_action( $action_id );
+ } catch ( Exception $e ) {
+ continue;
+ }
+ if ( is_a( $action, 'ActionScheduler_NullAction' ) ) {
+ continue;
+ }
+ $this->items[ $action_id ] = array(
+ 'ID' => $action_id,
+ 'hook' => $action->get_hook(),
+ 'status_name' => $this->store->get_status( $action_id ),
+ 'status' => $status_labels[ $this->store->get_status( $action_id ) ],
+ 'args' => $action->get_args(),
+ 'group' => $action->get_group(),
+ 'log_entries' => $this->logger->get_logs( $action_id ),
+ 'claim_id' => $this->store->get_claim_id( $action_id ),
+ 'recurrence' => $this->get_recurrence( $action ),
+ 'schedule' => $action->get_schedule(),
+ );
+ }
+
+ $this->set_pagination_args( array(
+ 'total_items' => $total_items,
+ 'per_page' => $per_page,
+ 'total_pages' => ceil( $total_items / $per_page ),
+ ) );
+ }
+
+ /**
+ * Prints the available statuses so the user can click to filter.
+ */
+ protected function display_filter_by_status() {
+ $this->status_counts = $this->store->action_counts();
+ parent::display_filter_by_status();
+ }
+
+ /**
+ * Get the text to display in the search box on the list table.
+ */
+ protected function get_search_box_button_text() {
+ return __( 'Search hook, args and claim ID', 'action-scheduler' );
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_LogEntry.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_LogEntry.php
new file mode 100644
index 00000000..649636de
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_LogEntry.php
@@ -0,0 +1,67 @@
+comment_type
+ * to ActionScheduler_LogEntry::__construct(), goodness knows why, and the Follow-up Emails plugin
+ * hard-codes loading its own version of ActionScheduler_wpCommentLogger with that out-dated method,
+ * goodness knows why, so we need to guard against that here instead of using a DateTime type declaration
+ * for the constructor's 3rd param of $date and causing a fatal error with older versions of FUE.
+ */
+ if ( null !== $date && ! is_a( $date, 'DateTime' ) ) {
+ _doing_it_wrong( __METHOD__, 'The third parameter must be a valid DateTime instance, or null.', '2.0.0' );
+ $date = null;
+ }
+
+ $this->action_id = $action_id;
+ $this->message = $message;
+ $this->date = $date ? $date : new Datetime;
+ }
+
+ /**
+ * Returns the date when this log entry was created
+ *
+ * @return Datetime
+ */
+ public function get_date() {
+ return $this->date;
+ }
+
+ public function get_action_id() {
+ return $this->action_id;
+ }
+
+ public function get_message() {
+ return $this->message;
+ }
+}
+
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_NullLogEntry.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_NullLogEntry.php
new file mode 100644
index 00000000..6f8f218a
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_NullLogEntry.php
@@ -0,0 +1,11 @@
+maybe_dispatch_async_request() uses a lock to avoid
+ * calling ActionScheduler_QueueRunner->has_maximum_concurrent_batches() every time the 'shutdown',
+ * hook is triggered, because that method calls ActionScheduler_QueueRunner->store->get_claim_count()
+ * to find the current number of claims in the database.
+ *
+ * @param string $lock_type A string to identify different lock types.
+ * @bool True if lock value has changed, false if not or if set failed.
+ */
+ public function set( $lock_type ) {
+ return update_option( $this->get_key( $lock_type ), time() + $this->get_duration( $lock_type ) );
+ }
+
+ /**
+ * If a lock is set, return the timestamp it was set to expiry.
+ *
+ * @param string $lock_type A string to identify different lock types.
+ * @return bool|int False if no lock is set, otherwise the timestamp for when the lock is set to expire.
+ */
+ public function get_expiration( $lock_type ) {
+ return get_option( $this->get_key( $lock_type ) );
+ }
+
+ /**
+ * Get the key to use for storing the lock in the transient
+ *
+ * @param string $lock_type A string to identify different lock types.
+ * @return string
+ */
+ protected function get_key( $lock_type ) {
+ return sprintf( 'action_scheduler_lock_%s', $lock_type );
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueCleaner.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueCleaner.php
new file mode 100644
index 00000000..1da13ab4
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueCleaner.php
@@ -0,0 +1,155 @@
+store = $store ? $store : ActionScheduler_Store::instance();
+ $this->batch_size = $batch_size;
+ }
+
+ public function delete_old_actions() {
+ $lifespan = apply_filters( 'action_scheduler_retention_period', $this->month_in_seconds );
+ $cutoff = as_get_datetime_object($lifespan.' seconds ago');
+
+ $statuses_to_purge = array(
+ ActionScheduler_Store::STATUS_COMPLETE,
+ ActionScheduler_Store::STATUS_CANCELED,
+ );
+
+ foreach ( $statuses_to_purge as $status ) {
+ $actions_to_delete = $this->store->query_actions( array(
+ 'status' => $status,
+ 'modified' => $cutoff,
+ 'modified_compare' => '<=',
+ 'per_page' => $this->get_batch_size(),
+ ) );
+
+ foreach ( $actions_to_delete as $action_id ) {
+ try {
+ $this->store->delete_action( $action_id );
+ } catch ( Exception $e ) {
+
+ /**
+ * Notify 3rd party code of exceptions when deleting a completed action older than the retention period
+ *
+ * This hook provides a way for 3rd party code to log or otherwise handle exceptions relating to their
+ * actions.
+ *
+ * @since 2.0.0
+ *
+ * @param int $action_id The scheduled actions ID in the data store
+ * @param Exception $e The exception thrown when attempting to delete the action from the data store
+ * @param int $lifespan The retention period, in seconds, for old actions
+ * @param int $count_of_actions_to_delete The number of old actions being deleted in this batch
+ */
+ do_action( 'action_scheduler_failed_old_action_deletion', $action_id, $e, $lifespan, count( $actions_to_delete ) );
+ }
+ }
+ }
+ }
+
+ /**
+ * Unclaim pending actions that have not been run within a given time limit.
+ *
+ * When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed
+ * as a parameter is 10x the time limit used for queue processing.
+ *
+ * @param int $time_limit The number of seconds to allow a queue to run before unclaiming its pending actions. Default 300 (5 minutes).
+ */
+ public function reset_timeouts( $time_limit = 300 ) {
+ $timeout = apply_filters( 'action_scheduler_timeout_period', $time_limit );
+ if ( $timeout < 0 ) {
+ return;
+ }
+ $cutoff = as_get_datetime_object($timeout.' seconds ago');
+ $actions_to_reset = $this->store->query_actions( array(
+ 'status' => ActionScheduler_Store::STATUS_PENDING,
+ 'modified' => $cutoff,
+ 'modified_compare' => '<=',
+ 'claimed' => true,
+ 'per_page' => $this->get_batch_size(),
+ ) );
+
+ foreach ( $actions_to_reset as $action_id ) {
+ $this->store->unclaim_action( $action_id );
+ do_action( 'action_scheduler_reset_action', $action_id );
+ }
+ }
+
+ /**
+ * Mark actions that have been running for more than a given time limit as failed, based on
+ * the assumption some uncatachable and unloggable fatal error occurred during processing.
+ *
+ * When called by ActionScheduler_Abstract_QueueRunner::run_cleanup(), the time limit passed
+ * as a parameter is 10x the time limit used for queue processing.
+ *
+ * @param int $time_limit The number of seconds to allow an action to run before it is considered to have failed. Default 300 (5 minutes).
+ */
+ public function mark_failures( $time_limit = 300 ) {
+ $timeout = apply_filters( 'action_scheduler_failure_period', $time_limit );
+ if ( $timeout < 0 ) {
+ return;
+ }
+ $cutoff = as_get_datetime_object($timeout.' seconds ago');
+ $actions_to_reset = $this->store->query_actions( array(
+ 'status' => ActionScheduler_Store::STATUS_RUNNING,
+ 'modified' => $cutoff,
+ 'modified_compare' => '<=',
+ 'per_page' => $this->get_batch_size(),
+ ) );
+
+ foreach ( $actions_to_reset as $action_id ) {
+ $this->store->mark_failure( $action_id );
+ do_action( 'action_scheduler_failed_action', $action_id, $timeout );
+ }
+ }
+
+ /**
+ * Do all of the cleaning actions.
+ *
+ * @param int $time_limit The number of seconds to use as the timeout and failure period. Default 300 (5 minutes).
+ * @author Jeremy Pry
+ */
+ public function clean( $time_limit = 300 ) {
+ $this->delete_old_actions();
+ $this->reset_timeouts( $time_limit );
+ $this->mark_failures( $time_limit );
+ }
+
+ /**
+ * Get the batch size for cleaning the queue.
+ *
+ * @author Jeremy Pry
+ * @return int
+ */
+ protected function get_batch_size() {
+ /**
+ * Filter the batch size when cleaning the queue.
+ *
+ * @param int $batch_size The number of actions to clean in one batch.
+ */
+ return absint( apply_filters( 'action_scheduler_cleanup_batch_size', $this->batch_size ) );
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php
new file mode 100644
index 00000000..cd76807e
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_QueueRunner.php
@@ -0,0 +1,197 @@
+store );
+ }
+
+ $this->async_request = $async_request;
+ }
+
+ /**
+ * @codeCoverageIgnore
+ */
+ public function init() {
+
+ add_filter( 'cron_schedules', array( self::instance(), 'add_wp_cron_schedule' ) );
+
+ // Check for and remove any WP Cron hook scheduled by Action Scheduler < 3.0.0, which didn't include the $context param
+ $next_timestamp = wp_next_scheduled( self::WP_CRON_HOOK );
+ if ( $next_timestamp ) {
+ wp_unschedule_event( $next_timestamp, self::WP_CRON_HOOK );
+ }
+
+ $cron_context = array( 'WP Cron' );
+
+ if ( ! wp_next_scheduled( self::WP_CRON_HOOK, $cron_context ) ) {
+ $schedule = apply_filters( 'action_scheduler_run_schedule', self::WP_CRON_SCHEDULE );
+ wp_schedule_event( time(), $schedule, self::WP_CRON_HOOK, $cron_context );
+ }
+
+ add_action( self::WP_CRON_HOOK, array( self::instance(), 'run' ) );
+ $this->hook_dispatch_async_request();
+ }
+
+ /**
+ * Hook check for dispatching an async request.
+ */
+ public function hook_dispatch_async_request() {
+ add_action( 'shutdown', array( $this, 'maybe_dispatch_async_request' ) );
+ }
+
+ /**
+ * Unhook check for dispatching an async request.
+ */
+ public function unhook_dispatch_async_request() {
+ remove_action( 'shutdown', array( $this, 'maybe_dispatch_async_request' ) );
+ }
+
+ /**
+ * Check if we should dispatch an async request to process actions.
+ *
+ * This method is attached to 'shutdown', so is called frequently. To avoid slowing down
+ * the site, it mitigates the work performed in each request by:
+ * 1. checking if it's in the admin context and then
+ * 2. haven't run on the 'shutdown' hook within the lock time (60 seconds by default)
+ * 3. haven't exceeded the number of allowed batches.
+ *
+ * The order of these checks is important, because they run from a check on a value:
+ * 1. in memory - is_admin() maps to $GLOBALS or the WP_ADMIN constant
+ * 2. in memory - transients use autoloaded options by default
+ * 3. from a database query - has_maximum_concurrent_batches() run the query
+ * $this->store->get_claim_count() to find the current number of claims in the DB.
+ *
+ * If all of these conditions are met, then we request an async runner check whether it
+ * should dispatch a request to process pending actions.
+ */
+ public function maybe_dispatch_async_request() {
+ if ( is_admin() && ! ActionScheduler::lock()->is_locked( 'async-request-runner' ) ) {
+ // Only start an async queue at most once every 60 seconds
+ ActionScheduler::lock()->set( 'async-request-runner' );
+ $this->async_request->maybe_dispatch();
+ }
+ }
+
+ /**
+ * Process actions in the queue. Attached to self::WP_CRON_HOOK i.e. 'action_scheduler_run_queue'
+ *
+ * The $context param of this method defaults to 'WP Cron', because prior to Action Scheduler 3.0.0
+ * that was the only context in which this method was run, and the self::WP_CRON_HOOK hook had no context
+ * passed along with it. New code calling this method directly, or by triggering the self::WP_CRON_HOOK,
+ * should set a context as the first parameter. For an example of this, refer to the code seen in
+ * @see ActionScheduler_AsyncRequest_QueueRunner::handle()
+ *
+ * @param string $context Optional identifer for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
+ * Generally, this should be capitalised and not localised as it's a proper noun.
+ * @return int The number of actions processed.
+ */
+ public function run( $context = 'WP Cron' ) {
+ ActionScheduler_Compatibility::raise_memory_limit();
+ ActionScheduler_Compatibility::raise_time_limit( $this->get_time_limit() );
+ do_action( 'action_scheduler_before_process_queue' );
+ $this->run_cleanup();
+ $processed_actions = 0;
+ if ( false === $this->has_maximum_concurrent_batches() ) {
+ $batch_size = apply_filters( 'action_scheduler_queue_runner_batch_size', 25 );
+ do {
+ $processed_actions_in_batch = $this->do_batch( $batch_size, $context );
+ $processed_actions += $processed_actions_in_batch;
+ } while ( $processed_actions_in_batch > 0 && ! $this->batch_limits_exceeded( $processed_actions ) ); // keep going until we run out of actions, time, or memory
+ }
+
+ do_action( 'action_scheduler_after_process_queue' );
+ return $processed_actions;
+ }
+
+ /**
+ * Process a batch of actions pending in the queue.
+ *
+ * Actions are processed by claiming a set of pending actions then processing each one until either the batch
+ * size is completed, or memory or time limits are reached, defined by @see $this->batch_limits_exceeded().
+ *
+ * @param int $size The maximum number of actions to process in the batch.
+ * @param string $context Optional identifer for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
+ * Generally, this should be capitalised and not localised as it's a proper noun.
+ * @return int The number of actions processed.
+ */
+ protected function do_batch( $size = 100, $context = '' ) {
+ $claim = $this->store->stake_claim($size);
+ $this->monitor->attach($claim);
+ $processed_actions = 0;
+
+ foreach ( $claim->get_actions() as $action_id ) {
+ // bail if we lost the claim
+ if ( ! in_array( $action_id, $this->store->find_actions_by_claim_id( $claim->get_id() ) ) ) {
+ break;
+ }
+ $this->process_action( $action_id, $context );
+ $processed_actions++;
+
+ if ( $this->batch_limits_exceeded( $processed_actions ) ) {
+ break;
+ }
+ }
+ $this->store->release_claim($claim);
+ $this->monitor->detach();
+ $this->clear_caches();
+ return $processed_actions;
+ }
+
+ /**
+ * Running large batches can eat up memory, as WP adds data to its object cache.
+ *
+ * If using a persistent object store, this has the side effect of flushing that
+ * as well, so this is disabled by default. To enable:
+ *
+ * add_filter( 'action_scheduler_queue_runner_flush_cache', '__return_true' );
+ */
+ protected function clear_caches() {
+ if ( ! wp_using_ext_object_cache() || apply_filters( 'action_scheduler_queue_runner_flush_cache', false ) ) {
+ wp_cache_flush();
+ }
+ }
+
+ public function add_wp_cron_schedule( $schedules ) {
+ $schedules['every_minute'] = array(
+ 'interval' => 60, // in seconds
+ 'display' => __( 'Every minute', 'action-scheduler' ),
+ );
+
+ return $schedules;
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Versions.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Versions.php
new file mode 100644
index 00000000..915c2e63
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Versions.php
@@ -0,0 +1,62 @@
+versions[$version_string]) ) {
+ return FALSE;
+ }
+ $this->versions[$version_string] = $initialization_callback;
+ return TRUE;
+ }
+
+ public function get_versions() {
+ return $this->versions;
+ }
+
+ public function latest_version() {
+ $keys = array_keys($this->versions);
+ if ( empty($keys) ) {
+ return false;
+ }
+ uasort( $keys, 'version_compare' );
+ return end($keys);
+ }
+
+ public function latest_version_callback() {
+ $latest = $this->latest_version();
+ if ( empty($latest) || !isset($this->versions[$latest]) ) {
+ return '__return_null';
+ }
+ return $this->versions[$latest];
+ }
+
+ /**
+ * @return ActionScheduler_Versions
+ * @codeCoverageIgnore
+ */
+ public static function instance() {
+ if ( empty(self::$instance) ) {
+ self::$instance = new self();
+ }
+ return self::$instance;
+ }
+
+ /**
+ * @codeCoverageIgnore
+ */
+ public static function initialize_latest_version() {
+ $self = self::instance();
+ call_user_func($self->latest_version_callback());
+ }
+}
+
\ No newline at end of file
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_WPCommentCleaner.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_WPCommentCleaner.php
new file mode 100644
index 00000000..1ba552c5
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_WPCommentCleaner.php
@@ -0,0 +1,115 @@
+ Status administration screen
+ add_action( 'load-tools_page_action-scheduler', array( __CLASS__, 'register_admin_notice' ) );
+ add_action( 'load-woocommerce_page_wc-status', array( __CLASS__, 'register_admin_notice' ) );
+ }
+
+ /**
+ * Determines if there are log entries in the wp comments table.
+ *
+ * Uses the flag set on migration completion set by @see self::maybe_schedule_cleanup().
+ *
+ * @return boolean Whether there are scheduled action comments in the comments table.
+ */
+ public static function has_logs() {
+ return 'yes' === get_option( self::$has_logs_option_key );
+ }
+
+ /**
+ * Schedules the WP Post comment table cleanup to run in 6 months if it's not already scheduled.
+ * Attached to the migration complete hook 'action_scheduler/migration_complete'.
+ */
+ public static function maybe_schedule_cleanup() {
+ if ( (bool) get_comments( array( 'type' => ActionScheduler_wpCommentLogger::TYPE, 'number' => 1, 'fields' => 'ids' ) ) ) {
+ update_option( self::$has_logs_option_key, 'yes' );
+
+ if ( ! as_next_scheduled_action( self::$cleanup_hook ) ) {
+ as_schedule_single_action( gmdate( 'U' ) + ( 6 * MONTH_IN_SECONDS ), self::$cleanup_hook );
+ }
+ }
+ }
+
+ /**
+ * Delete all action comments from the WP Comments table.
+ */
+ public static function delete_all_action_comments() {
+ global $wpdb;
+ $wpdb->delete( $wpdb->comments, array( 'comment_type' => ActionScheduler_wpCommentLogger::TYPE, 'comment_agent' => ActionScheduler_wpCommentLogger::AGENT ) );
+ delete_option( self::$has_logs_option_key );
+ }
+
+ /**
+ * Registers admin notices about the orphaned action logs.
+ */
+ public static function register_admin_notice() {
+ add_action( 'admin_notices', array( __CLASS__, 'print_admin_notice' ) );
+ }
+
+ /**
+ * Prints details about the orphaned action logs and includes information on where to learn more.
+ */
+ public static function print_admin_notice() {
+ $next_cleanup_message = '';
+ $next_scheduled_cleanup_hook = as_next_scheduled_action( self::$cleanup_hook );
+
+ if ( $next_scheduled_cleanup_hook ) {
+ /* translators: %s: date interval */
+ $next_cleanup_message = sprintf( __( 'This data will be deleted in %s.', 'action-scheduler' ), human_time_diff( gmdate( 'U' ), $next_scheduled_cleanup_hook ) );
+ }
+
+ $notice = sprintf(
+ /* translators: 1: next cleanup message 2: github issue URL */
+ __( 'Action Scheduler has migrated data to custom tables; however, orphaned log entries exist in the WordPress Comments table. %1$s Learn more »', 'action-scheduler' ),
+ $next_cleanup_message,
+ 'https://github.com/woocommerce/action-scheduler/issues/368'
+ );
+
+ echo '
' . wp_kses_post( $notice ) . '
';
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_wcSystemStatus.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_wcSystemStatus.php
new file mode 100644
index 00000000..e81382a6
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/ActionScheduler_wcSystemStatus.php
@@ -0,0 +1,152 @@
+store = $store;
+ }
+
+ /**
+ * Display action data, including number of actions grouped by status and the oldest & newest action in each status.
+ *
+ * Helpful to identify issues, like a clogged queue.
+ */
+ public function render() {
+ $action_counts = $this->store->action_counts();
+ $status_labels = $this->store->get_status_labels();
+ $oldest_and_newest = $this->get_oldest_and_newest( array_keys( $status_labels ) );
+
+ $this->get_template( $status_labels, $action_counts, $oldest_and_newest );
+ }
+
+ /**
+ * Get oldest and newest scheduled dates for a given set of statuses.
+ *
+ * @param array $status_keys Set of statuses to find oldest & newest action for.
+ * @return array
+ */
+ protected function get_oldest_and_newest( $status_keys ) {
+
+ $oldest_and_newest = array();
+
+ foreach ( $status_keys as $status ) {
+ $oldest_and_newest[ $status ] = array(
+ 'oldest' => '–',
+ 'newest' => '–',
+ );
+
+ if ( 'in-progress' === $status ) {
+ continue;
+ }
+
+ $oldest_and_newest[ $status ]['oldest'] = $this->get_action_status_date( $status, 'oldest' );
+ $oldest_and_newest[ $status ]['newest'] = $this->get_action_status_date( $status, 'newest' );
+ }
+
+ return $oldest_and_newest;
+ }
+
+ /**
+ * Get oldest or newest scheduled date for a given status.
+ *
+ * @param string $status Action status label/name string.
+ * @param string $date_type Oldest or Newest.
+ * @return DateTime
+ */
+ protected function get_action_status_date( $status, $date_type = 'oldest' ) {
+
+ $order = 'oldest' === $date_type ? 'ASC' : 'DESC';
+
+ $action = $this->store->query_actions( array(
+ 'claimed' => false,
+ 'status' => $status,
+ 'per_page' => 1,
+ 'order' => $order,
+ ) );
+
+ if ( ! empty( $action ) ) {
+ $date_object = $this->store->get_date( $action[0] );
+ $action_date = $date_object->format( 'Y-m-d H:i:s O' );
+ } else {
+ $action_date = '–';
+ }
+
+ return $action_date;
+ }
+
+ /**
+ * Get oldest or newest scheduled date for a given status.
+ *
+ * @param array $status_labels Set of statuses to find oldest & newest action for.
+ * @param array $action_counts Number of actions grouped by status.
+ * @param array $oldest_and_newest Date of the oldest and newest action with each status.
+ */
+ protected function get_template( $status_labels, $action_counts, $oldest_and_newest ) {
+ $as_version = ActionScheduler_Versions::instance()->latest_version();
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $count ) {
+ // WC uses the 3rd column for export, so we need to display more data in that (hidden when viewed as part of the table) and add an empty 2nd column.
+ printf(
+ '
+
+ run_cleanup();
+ $this->add_hooks();
+
+ // Check to make sure there aren't too many concurrent processes running.
+ if ( $this->has_maximum_concurrent_batches() ) {
+ if ( $force ) {
+ WP_CLI::warning( __( 'There are too many concurrent batches, but the run is forced to continue.', 'action-scheduler' ) );
+ } else {
+ WP_CLI::error( __( 'There are too many concurrent batches.', 'action-scheduler' ) );
+ }
+ }
+
+ // Stake a claim and store it.
+ $this->claim = $this->store->stake_claim( $batch_size, null, $hooks, $group );
+ $this->monitor->attach( $this->claim );
+ $this->actions = $this->claim->get_actions();
+
+ return count( $this->actions );
+ }
+
+ /**
+ * Add our hooks to the appropriate actions.
+ *
+ * @author Jeremy Pry
+ */
+ protected function add_hooks() {
+ add_action( 'action_scheduler_before_execute', array( $this, 'before_execute' ) );
+ add_action( 'action_scheduler_after_execute', array( $this, 'after_execute' ), 10, 2 );
+ add_action( 'action_scheduler_failed_execution', array( $this, 'action_failed' ), 10, 2 );
+ }
+
+ /**
+ * Set up the WP CLI progress bar.
+ *
+ * @author Jeremy Pry
+ */
+ protected function setup_progress_bar() {
+ $count = count( $this->actions );
+ $this->progress_bar = new ProgressBar(
+ /* translators: %d: amount of actions */
+ sprintf( _n( 'Running %d action', 'Running %d actions', $count, 'action-scheduler' ), number_format_i18n( $count ) ),
+ $count
+ );
+ }
+
+ /**
+ * Process actions in the queue.
+ *
+ * @author Jeremy Pry
+ *
+ * @param string $context Optional runner context. Default 'WP CLI'.
+ *
+ * @return int The number of actions processed.
+ */
+ public function run( $context = 'WP CLI' ) {
+ do_action( 'action_scheduler_before_process_queue' );
+ $this->setup_progress_bar();
+ foreach ( $this->actions as $action_id ) {
+ // Error if we lost the claim.
+ if ( ! in_array( $action_id, $this->store->find_actions_by_claim_id( $this->claim->get_id() ) ) ) {
+ WP_CLI::warning( __( 'The claim has been lost. Aborting current batch.', 'action-scheduler' ) );
+ break;
+ }
+
+ $this->process_action( $action_id, $context );
+ $this->progress_bar->tick();
+ }
+
+ $completed = $this->progress_bar->current();
+ $this->progress_bar->finish();
+ $this->store->release_claim( $this->claim );
+ do_action( 'action_scheduler_after_process_queue' );
+
+ return $completed;
+ }
+
+ /**
+ * Handle WP CLI message when the action is starting.
+ *
+ * @author Jeremy Pry
+ *
+ * @param $action_id
+ */
+ public function before_execute( $action_id ) {
+ /* translators: %s refers to the action ID */
+ WP_CLI::log( sprintf( __( 'Started processing action %s', 'action-scheduler' ), $action_id ) );
+ }
+
+ /**
+ * Handle WP CLI message when the action has completed.
+ *
+ * @author Jeremy Pry
+ *
+ * @param int $action_id
+ * @param null|ActionScheduler_Action $action The instance of the action. Default to null for backward compatibility.
+ */
+ public function after_execute( $action_id, $action = null ) {
+ // backward compatibility
+ if ( null === $action ) {
+ $action = $this->store->fetch_action( $action_id );
+ }
+ /* translators: 1: action ID 2: hook name */
+ WP_CLI::log( sprintf( __( 'Completed processing action %1$s with hook: %2$s', 'action-scheduler' ), $action_id, $action->get_hook() ) );
+ }
+
+ /**
+ * Handle WP CLI message when the action has failed.
+ *
+ * @author Jeremy Pry
+ *
+ * @param int $action_id
+ * @param Exception $exception
+ * @throws \WP_CLI\ExitException With failure message.
+ */
+ public function action_failed( $action_id, $exception ) {
+ WP_CLI::error(
+ /* translators: 1: action ID 2: exception message */
+ sprintf( __( 'Error processing action %1$s: %2$s', 'action-scheduler' ), $action_id, $exception->getMessage() ),
+ false
+ );
+ }
+
+ /**
+ * Sleep and help avoid hitting memory limit
+ *
+ * @param int $sleep_time Amount of seconds to sleep
+ * @deprecated 3.0.0
+ */
+ protected function stop_the_insanity( $sleep_time = 0 ) {
+ _deprecated_function( 'ActionScheduler_WPCLI_QueueRunner::stop_the_insanity', '3.0.0', 'ActionScheduler_DataController::free_memory' );
+
+ ActionScheduler_DataController::free_memory();
+ }
+
+ /**
+ * Maybe trigger the stop_the_insanity() method to free up memory.
+ */
+ protected function maybe_stop_the_insanity() {
+ // The value returned by progress_bar->current() might be padded. Remove padding, and convert to int.
+ $current_iteration = intval( trim( $this->progress_bar->current() ) );
+ if ( 0 === $current_iteration % 50 ) {
+ $this->stop_the_insanity();
+ }
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php
new file mode 100644
index 00000000..6cf27d42
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Scheduler_command.php
@@ -0,0 +1,158 @@
+]
+ * : The maximum number of actions to run. Defaults to 100.
+ *
+ * [--batches=]
+ * : Limit execution to a number of batches. Defaults to 0, meaning batches will continue being executed until all actions are complete.
+ *
+ * [--cleanup-batch-size=]
+ * : The maximum number of actions to clean up. Defaults to the value of --batch-size.
+ *
+ * [--hooks=]
+ * : Only run actions with the specified hook. Omitting this option runs actions with any hook. Define multiple hooks as a comma separated string (without spaces), e.g. `--hooks=hook_one,hook_two,hook_three`
+ *
+ * [--group=]
+ * : Only run actions from the specified group. Omitting this option runs actions from all groups.
+ *
+ * [--free-memory-on=]
+ * : The number of actions to process between freeing memory. 0 disables freeing memory. Default 50.
+ *
+ * [--pause=]
+ * : The number of seconds to pause when freeing memory. Default no pause.
+ *
+ * [--force]
+ * : Whether to force execution despite the maximum number of concurrent processes being exceeded.
+ *
+ * @param array $args Positional arguments.
+ * @param array $assoc_args Keyed arguments.
+ * @throws \WP_CLI\ExitException When an error occurs.
+ *
+ * @subcommand run
+ */
+ public function run( $args, $assoc_args ) {
+ // Handle passed arguments.
+ $batch = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batch-size', 100 ) );
+ $batches = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'batches', 0 ) );
+ $clean = absint( \WP_CLI\Utils\get_flag_value( $assoc_args, 'cleanup-batch-size', $batch ) );
+ $hooks = explode( ',', WP_CLI\Utils\get_flag_value( $assoc_args, 'hooks', '' ) );
+ $hooks = array_filter( array_map( 'trim', $hooks ) );
+ $group = \WP_CLI\Utils\get_flag_value( $assoc_args, 'group', '' );
+ $free_on = \WP_CLI\Utils\get_flag_value( $assoc_args, 'free-memory-on', 50 );
+ $sleep = \WP_CLI\Utils\get_flag_value( $assoc_args, 'pause', 0 );
+ $force = \WP_CLI\Utils\get_flag_value( $assoc_args, 'force', false );
+
+ ActionScheduler_DataController::set_free_ticks( $free_on );
+ ActionScheduler_DataController::set_sleep_time( $sleep );
+
+ $batches_completed = 0;
+ $actions_completed = 0;
+ $unlimited = $batches === 0;
+
+ try {
+ // Custom queue cleaner instance.
+ $cleaner = new ActionScheduler_QueueCleaner( null, $clean );
+
+ // Get the queue runner instance
+ $runner = new ActionScheduler_WPCLI_QueueRunner( null, null, $cleaner );
+
+ // Determine how many tasks will be run in the first batch.
+ $total = $runner->setup( $batch, $hooks, $group, $force );
+
+ // Run actions for as long as possible.
+ while ( $total > 0 ) {
+ $this->print_total_actions( $total );
+ $actions_completed += $runner->run();
+ $batches_completed++;
+
+ // Maybe set up tasks for the next batch.
+ $total = ( $unlimited || $batches_completed < $batches ) ? $runner->setup( $batch, $hooks, $group, $force ) : 0;
+ }
+ } catch ( Exception $e ) {
+ $this->print_error( $e );
+ }
+
+ $this->print_total_batches( $batches_completed );
+ $this->print_success( $actions_completed );
+ }
+
+ /**
+ * Print WP CLI message about how many actions are about to be processed.
+ *
+ * @author Jeremy Pry
+ *
+ * @param int $total
+ */
+ protected function print_total_actions( $total ) {
+ WP_CLI::log(
+ sprintf(
+ /* translators: %d refers to how many scheduled taks were found to run */
+ _n( 'Found %d scheduled task', 'Found %d scheduled tasks', $total, 'action-scheduler' ),
+ number_format_i18n( $total )
+ )
+ );
+ }
+
+ /**
+ * Print WP CLI message about how many batches of actions were processed.
+ *
+ * @author Jeremy Pry
+ *
+ * @param int $batches_completed
+ */
+ protected function print_total_batches( $batches_completed ) {
+ WP_CLI::log(
+ sprintf(
+ /* translators: %d refers to the total number of batches executed */
+ _n( '%d batch executed.', '%d batches executed.', $batches_completed, 'action-scheduler' ),
+ number_format_i18n( $batches_completed )
+ )
+ );
+ }
+
+ /**
+ * Convert an exception into a WP CLI error.
+ *
+ * @author Jeremy Pry
+ *
+ * @param Exception $e The error object.
+ *
+ * @throws \WP_CLI\ExitException
+ */
+ protected function print_error( Exception $e ) {
+ WP_CLI::error(
+ sprintf(
+ /* translators: %s refers to the exception error message */
+ __( 'There was an error running the action scheduler: %s', 'action-scheduler' ),
+ $e->getMessage()
+ )
+ );
+ }
+
+ /**
+ * Print a success message with the number of completed actions.
+ *
+ * @author Jeremy Pry
+ *
+ * @param int $actions_completed
+ */
+ protected function print_success( $actions_completed ) {
+ WP_CLI::success(
+ sprintf(
+ /* translators: %d refers to the total number of taskes completed */
+ _n( '%d scheduled task completed.', '%d scheduled tasks completed.', $actions_completed, 'action-scheduler' ),
+ number_format_i18n( $actions_completed )
+ )
+ );
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/Migration_Command.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/Migration_Command.php
new file mode 100644
index 00000000..066697e4
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/Migration_Command.php
@@ -0,0 +1,148 @@
+ 'Migrates actions to the DB tables store',
+ 'synopsis' => [
+ [
+ 'type' => 'assoc',
+ 'name' => 'batch-size',
+ 'optional' => true,
+ 'default' => 100,
+ 'description' => 'The number of actions to process in each batch',
+ ],
+ [
+ 'type' => 'assoc',
+ 'name' => 'free-memory-on',
+ 'optional' => true,
+ 'default' => 50,
+ 'description' => 'The number of actions to process between freeing memory. 0 disables freeing memory',
+ ],
+ [
+ 'type' => 'assoc',
+ 'name' => 'pause',
+ 'optional' => true,
+ 'default' => 0,
+ 'description' => 'The number of seconds to pause when freeing memory',
+ ],
+ [
+ 'type' => 'flag',
+ 'name' => 'dry-run',
+ 'optional' => true,
+ 'description' => 'Reports on the actions that would have been migrated, but does not change any data',
+ ],
+ ],
+ ] );
+ }
+
+ /**
+ * Process the data migration.
+ *
+ * @param array $positional_args Required for WP CLI. Not used in migration.
+ * @param array $assoc_args Optional arguments.
+ *
+ * @return void
+ */
+ public function migrate( $positional_args, $assoc_args ) {
+ $this->init_logging();
+
+ $config = $this->get_migration_config( $assoc_args );
+ $runner = new Runner( $config );
+ $runner->init_destination();
+
+ $batch_size = isset( $assoc_args[ 'batch-size' ] ) ? (int) $assoc_args[ 'batch-size' ] : 100;
+ $free_on = isset( $assoc_args[ 'free-memory-on' ] ) ? (int) $assoc_args[ 'free-memory-on' ] : 50;
+ $sleep = isset( $assoc_args[ 'pause' ] ) ? (int) $assoc_args[ 'pause' ] : 0;
+ \ActionScheduler_DataController::set_free_ticks( $free_on );
+ \ActionScheduler_DataController::set_sleep_time( $sleep );
+
+ do {
+ $actions_processed = $runner->run( $batch_size );
+ $this->total_processed += $actions_processed;
+ } while ( $actions_processed > 0 );
+
+ if ( ! $config->get_dry_run() ) {
+ // let the scheduler know that there's nothing left to do
+ $scheduler = new Scheduler();
+ $scheduler->mark_complete();
+ }
+
+ WP_CLI::success( sprintf( '%s complete. %d actions processed.', $config->get_dry_run() ? 'Dry run' : 'Migration', $this->total_processed ) );
+ }
+
+ /**
+ * Build the config object used to create the Runner
+ *
+ * @param array $args Optional arguments.
+ *
+ * @return ActionScheduler\Migration\Config
+ */
+ private function get_migration_config( $args ) {
+ $args = wp_parse_args( $args, [
+ 'dry-run' => false,
+ ] );
+
+ $config = Controller::instance()->get_migration_config_object();
+ $config->set_dry_run( ! empty( $args[ 'dry-run' ] ) );
+
+ return $config;
+ }
+
+ /**
+ * Hook command line logging into migration actions.
+ */
+ private function init_logging() {
+ add_action( 'action_scheduler/migrate_action_dry_run', function ( $action_id ) {
+ WP_CLI::debug( sprintf( 'Dry-run: migrated action %d', $action_id ) );
+ }, 10, 1 );
+ add_action( 'action_scheduler/no_action_to_migrate', function ( $action_id ) {
+ WP_CLI::debug( sprintf( 'No action found to migrate for ID %d', $action_id ) );
+ }, 10, 1 );
+ add_action( 'action_scheduler/migrate_action_failed', function ( $action_id ) {
+ WP_CLI::warning( sprintf( 'Failed migrating action with ID %d', $action_id ) );
+ }, 10, 1 );
+ add_action( 'action_scheduler/migrate_action_incomplete', function ( $source_id, $destination_id ) {
+ WP_CLI::warning( sprintf( 'Unable to remove source action with ID %d after migrating to new ID %d', $source_id, $destination_id ) );
+ }, 10, 2 );
+ add_action( 'action_scheduler/migrated_action', function ( $source_id, $destination_id ) {
+ WP_CLI::debug( sprintf( 'Migrated source action with ID %d to new store with ID %d', $source_id, $destination_id ) );
+ }, 10, 2 );
+ add_action( 'action_scheduler/migration_batch_starting', function ( $batch ) {
+ WP_CLI::debug( 'Beginning migration of batch: ' . print_r( $batch, true ) );
+ }, 10, 1 );
+ add_action( 'action_scheduler/migration_batch_complete', function ( $batch ) {
+ WP_CLI::log( sprintf( 'Completed migration of %d actions', count( $batch ) ) );
+ }, 10, 1 );
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/ProgressBar.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/ProgressBar.php
new file mode 100644
index 00000000..c86c74e8
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/WP_CLI/ProgressBar.php
@@ -0,0 +1,119 @@
+total_ticks = 0;
+ $this->message = $message;
+ $this->count = $count;
+ $this->interval = $interval;
+ }
+
+ /**
+ * Increment the progress bar ticks.
+ */
+ public function tick() {
+ if ( null === $this->progress_bar ) {
+ $this->setup_progress_bar();
+ }
+
+ $this->progress_bar->tick();
+ $this->total_ticks++;
+
+ do_action( 'action_scheduler/progress_tick', $this->total_ticks );
+ }
+
+ /**
+ * Get the progress bar tick count.
+ *
+ * @return int
+ */
+ public function current() {
+ return $this->progress_bar ? $this->progress_bar->current() : 0;
+ }
+
+ /**
+ * Finish the current progress bar.
+ */
+ public function finish() {
+ if ( null !== $this->progress_bar ) {
+ $this->progress_bar->finish();
+ }
+
+ $this->progress_bar = null;
+ }
+
+ /**
+ * Set the message used when creating the progress bar.
+ *
+ * @param string $message The message to be used when the next progress bar is created.
+ */
+ public function set_message( $message ) {
+ $this->message = $message;
+ }
+
+ /**
+ * Set the count for a new progress bar.
+ *
+ * @param integer $count The total number of ticks expected to complete.
+ */
+ public function set_count( $count ) {
+ $this->count = $count;
+ $this->finish();
+ }
+
+ /**
+ * Set up the progress bar.
+ */
+ protected function setup_progress_bar() {
+ $this->progress_bar = \WP_CLI\Utils\make_progress_bar(
+ $this->message,
+ $this->count,
+ $this->interval
+ );
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler.php
new file mode 100644
index 00000000..a5a6161a
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler.php
@@ -0,0 +1,304 @@
+init();
+ $store->init();
+ $logger->init();
+ $runner->init();
+ }
+
+ if ( apply_filters( 'action_scheduler_load_deprecated_functions', true ) ) {
+ require_once( self::plugin_path( 'deprecated/functions.php' ) );
+ }
+
+ if ( defined( 'WP_CLI' ) && WP_CLI ) {
+ WP_CLI::add_command( 'action-scheduler', 'ActionScheduler_WPCLI_Scheduler_command' );
+ if ( ! ActionScheduler_DataController::is_migration_complete() && Controller::instance()->allow_migration() ) {
+ $command = new Migration_Command();
+ $command->register();
+ }
+ }
+
+ self::$data_store_initialized = true;
+
+ /**
+ * Handle WP comment cleanup after migration.
+ */
+ if ( is_a( $logger, 'ActionScheduler_DBLogger' ) && ActionScheduler_DataController::is_migration_complete() && ActionScheduler_WPCommentCleaner::has_logs() ) {
+ ActionScheduler_WPCommentCleaner::init();
+ }
+
+ add_action( 'action_scheduler/migration_complete', 'ActionScheduler_WPCommentCleaner::maybe_schedule_cleanup' );
+ }
+
+ /**
+ * Check whether the AS data store has been initialized.
+ *
+ * @param string $function_name The name of the function being called. Optional. Default `null`.
+ * @return bool
+ */
+ public static function is_initialized( $function_name = null ) {
+ if ( ! self::$data_store_initialized && ! empty( $function_name ) ) {
+ $message = sprintf( __( '%s() was called before the Action Scheduler data store was initialized', 'action-scheduler' ), esc_attr( $function_name ) );
+ error_log( $message, E_WARNING );
+ }
+
+ return self::$data_store_initialized;
+ }
+
+ /**
+ * Determine if the class is one of our abstract classes.
+ *
+ * @since 3.0.0
+ *
+ * @param string $class The class name.
+ *
+ * @return bool
+ */
+ protected static function is_class_abstract( $class ) {
+ static $abstracts = array(
+ 'ActionScheduler' => true,
+ 'ActionScheduler_Abstract_ListTable' => true,
+ 'ActionScheduler_Abstract_QueueRunner' => true,
+ 'ActionScheduler_Abstract_Schedule' => true,
+ 'ActionScheduler_Abstract_RecurringSchedule' => true,
+ 'ActionScheduler_Lock' => true,
+ 'ActionScheduler_Logger' => true,
+ 'ActionScheduler_Abstract_Schema' => true,
+ 'ActionScheduler_Store' => true,
+ 'ActionScheduler_TimezoneHelper' => true,
+ );
+
+ return isset( $abstracts[ $class ] ) && $abstracts[ $class ];
+ }
+
+ /**
+ * Determine if the class is one of our migration classes.
+ *
+ * @since 3.0.0
+ *
+ * @param string $class The class name.
+ *
+ * @return bool
+ */
+ protected static function is_class_migration( $class ) {
+ static $migration_segments = array(
+ 'ActionMigrator' => true,
+ 'BatchFetcher' => true,
+ 'DBStoreMigrator' => true,
+ 'DryRun' => true,
+ 'LogMigrator' => true,
+ 'Config' => true,
+ 'Controller' => true,
+ 'Runner' => true,
+ 'Scheduler' => true,
+ );
+
+ $segments = explode( '_', $class );
+ $segment = isset( $segments[ 1 ] ) ? $segments[ 1 ] : $class;
+
+ return isset( $migration_segments[ $segment ] ) && $migration_segments[ $segment ];
+ }
+
+ /**
+ * Determine if the class is one of our WP CLI classes.
+ *
+ * @since 3.0.0
+ *
+ * @param string $class The class name.
+ *
+ * @return bool
+ */
+ protected static function is_class_cli( $class ) {
+ static $cli_segments = array(
+ 'QueueRunner' => true,
+ 'Command' => true,
+ 'ProgressBar' => true,
+ );
+
+ $segments = explode( '_', $class );
+ $segment = isset( $segments[ 1 ] ) ? $segments[ 1 ] : $class;
+
+ return isset( $cli_segments[ $segment ] ) && $cli_segments[ $segment ];
+ }
+
+ final public function __clone() {
+ trigger_error("Singleton. No cloning allowed!", E_USER_ERROR);
+ }
+
+ final public function __wakeup() {
+ trigger_error("Singleton. No serialization allowed!", E_USER_ERROR);
+ }
+
+ final private function __construct() {}
+
+ /** Deprecated **/
+
+ public static function get_datetime_object( $when = null, $timezone = 'UTC' ) {
+ _deprecated_function( __METHOD__, '2.0', 'wcs_add_months()' );
+ return as_get_datetime_object( $when, $timezone );
+ }
+
+ /**
+ * Issue deprecated warning if an Action Scheduler function is called in the shutdown hook.
+ *
+ * @param string $function_name The name of the function being called.
+ * @deprecated 3.1.6.
+ */
+ public static function check_shutdown_hook( $function_name ) {
+ _deprecated_function( __FUNCTION__, '3.1.6' );
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php
new file mode 100644
index 00000000..334d5b5b
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php
@@ -0,0 +1,674 @@
+ value pair. The
+ * key must much the table column name and the value is the label, which is
+ * automatically translated.
+ */
+ protected $columns = array();
+
+ /**
+ * Defines the row-actions. It expects an array where the key
+ * is the column name and the value is an array of actions.
+ *
+ * The array of actions are key => value, where key is the method name
+ * (with the prefix row_action_) and the value is the label
+ * and title.
+ */
+ protected $row_actions = array();
+
+ /**
+ * The Primary key of our table
+ */
+ protected $ID = 'ID';
+
+ /**
+ * Enables sorting, it expects an array
+ * of columns (the column names are the values)
+ */
+ protected $sort_by = array();
+
+ protected $filter_by = array();
+
+ /**
+ * @var array The status name => count combinations for this table's items. Used to display status filters.
+ */
+ protected $status_counts = array();
+
+ /**
+ * @var array Notices to display when loading the table. Array of arrays of form array( 'class' => {updated|error}, 'message' => 'This is the notice text display.' ).
+ */
+ protected $admin_notices = array();
+
+ /**
+ * @var string Localised string displayed in the
element above the able.
+ */
+ protected $table_header;
+
+ /**
+ * Enables bulk actions. It must be an array where the key is the action name
+ * and the value is the label (which is translated automatically). It is important
+ * to notice that it will check that the method exists (`bulk_$name`) and will throw
+ * an exception if it does not exists.
+ *
+ * This class will automatically check if the current request has a bulk action, will do the
+ * validations and afterwards will execute the bulk method, with two arguments. The first argument
+ * is the array with primary keys, the second argument is a string with a list of the primary keys,
+ * escaped and ready to use (with `IN`).
+ */
+ protected $bulk_actions = array();
+
+ /**
+ * Makes translation easier, it basically just wraps
+ * `_x` with some default (the package name).
+ *
+ * @deprecated 3.0.0
+ */
+ protected function translate( $text, $context = '' ) {
+ return $text;
+ }
+
+ /**
+ * Reads `$this->bulk_actions` and returns an array that WP_List_Table understands. It
+ * also validates that the bulk method handler exists. It throws an exception because
+ * this is a library meant for developers and missing a bulk method is a development-time error.
+ */
+ protected function get_bulk_actions() {
+ $actions = array();
+
+ foreach ( $this->bulk_actions as $action => $label ) {
+ if ( ! is_callable( array( $this, 'bulk_' . $action ) ) ) {
+ throw new RuntimeException( "The bulk action $action does not have a callback method" );
+ }
+
+ $actions[ $action ] = $label;
+ }
+
+ return $actions;
+ }
+
+ /**
+ * Checks if the current request has a bulk action. If that is the case it will validate and will
+ * execute the bulk method handler. Regardless if the action is valid or not it will redirect to
+ * the previous page removing the current arguments that makes this request a bulk action.
+ */
+ protected function process_bulk_action() {
+ global $wpdb;
+ // Detect when a bulk action is being triggered.
+ $action = $this->current_action();
+ if ( ! $action ) {
+ return;
+ }
+
+ check_admin_referer( 'bulk-' . $this->_args['plural'] );
+
+ $method = 'bulk_' . $action;
+ if ( array_key_exists( $action, $this->bulk_actions ) && is_callable( array( $this, $method ) ) && ! empty( $_GET['ID'] ) && is_array( $_GET['ID'] ) ) {
+ $ids_sql = '(' . implode( ',', array_fill( 0, count( $_GET['ID'] ), '%s' ) ) . ')';
+ $this->$method( $_GET['ID'], $wpdb->prepare( $ids_sql, $_GET['ID'] ) );
+ }
+
+ wp_redirect( remove_query_arg(
+ array( '_wp_http_referer', '_wpnonce', 'ID', 'action', 'action2' ),
+ wp_unslash( $_SERVER['REQUEST_URI'] )
+ ) );
+ exit;
+ }
+
+ /**
+ * Default code for deleting entries.
+ * validated already by process_bulk_action()
+ */
+ protected function bulk_delete( array $ids, $ids_sql ) {
+ $store = ActionScheduler::store();
+ foreach ( $ids as $action_id ) {
+ $store->delete( $action_id );
+ }
+ }
+
+ /**
+ * Prepares the _column_headers property which is used by WP_Table_List at rendering.
+ * It merges the columns and the sortable columns.
+ */
+ protected function prepare_column_headers() {
+ $this->_column_headers = array(
+ $this->get_columns(),
+ array(),
+ $this->get_sortable_columns(),
+ );
+ }
+
+ /**
+ * Reads $this->sort_by and returns the columns name in a format that WP_Table_List
+ * expects
+ */
+ public function get_sortable_columns() {
+ $sort_by = array();
+ foreach ( $this->sort_by as $column ) {
+ $sort_by[ $column ] = array( $column, true );
+ }
+ return $sort_by;
+ }
+
+ /**
+ * Returns the columns names for rendering. It adds a checkbox for selecting everything
+ * as the first column
+ */
+ public function get_columns() {
+ $columns = array_merge(
+ array( 'cb' => '' ),
+ $this->columns
+ );
+
+ return $columns;
+ }
+
+ /**
+ * Get prepared LIMIT clause for items query
+ *
+ * @global wpdb $wpdb
+ *
+ * @return string Prepared LIMIT clause for items query.
+ */
+ protected function get_items_query_limit() {
+ global $wpdb;
+
+ $per_page = $this->get_items_per_page( $this->package . '_items_per_page', $this->items_per_page );
+ return $wpdb->prepare( 'LIMIT %d', $per_page );
+ }
+
+ /**
+ * Returns the number of items to offset/skip for this current view.
+ *
+ * @return int
+ */
+ protected function get_items_offset() {
+ $per_page = $this->get_items_per_page( $this->package . '_items_per_page', $this->items_per_page );
+ $current_page = $this->get_pagenum();
+ if ( 1 < $current_page ) {
+ $offset = $per_page * ( $current_page - 1 );
+ } else {
+ $offset = 0;
+ }
+
+ return $offset;
+ }
+
+ /**
+ * Get prepared OFFSET clause for items query
+ *
+ * @global wpdb $wpdb
+ *
+ * @return string Prepared OFFSET clause for items query.
+ */
+ protected function get_items_query_offset() {
+ global $wpdb;
+
+ return $wpdb->prepare( 'OFFSET %d', $this->get_items_offset() );
+ }
+
+ /**
+ * Prepares the ORDER BY sql statement. It uses `$this->sort_by` to know which
+ * columns are sortable. This requests validates the orderby $_GET parameter is a valid
+ * column and sortable. It will also use order (ASC|DESC) using DESC by default.
+ */
+ protected function get_items_query_order() {
+ if ( empty( $this->sort_by ) ) {
+ return '';
+ }
+
+ $orderby = esc_sql( $this->get_request_orderby() );
+ $order = esc_sql( $this->get_request_order() );
+
+ return "ORDER BY {$orderby} {$order}";
+ }
+
+ /**
+ * Return the sortable column specified for this request to order the results by, if any.
+ *
+ * @return string
+ */
+ protected function get_request_orderby() {
+
+ $valid_sortable_columns = array_values( $this->sort_by );
+
+ if ( ! empty( $_GET['orderby'] ) && in_array( $_GET['orderby'], $valid_sortable_columns ) ) {
+ $orderby = sanitize_text_field( $_GET['orderby'] );
+ } else {
+ $orderby = $valid_sortable_columns[0];
+ }
+
+ return $orderby;
+ }
+
+ /**
+ * Return the sortable column order specified for this request.
+ *
+ * @return string
+ */
+ protected function get_request_order() {
+
+ if ( ! empty( $_GET['order'] ) && 'desc' === strtolower( $_GET['order'] ) ) {
+ $order = 'DESC';
+ } else {
+ $order = 'ASC';
+ }
+
+ return $order;
+ }
+
+ /**
+ * Return the status filter for this request, if any.
+ *
+ * @return string
+ */
+ protected function get_request_status() {
+ $status = ( ! empty( $_GET['status'] ) ) ? $_GET['status'] : '';
+ return $status;
+ }
+
+ /**
+ * Return the search filter for this request, if any.
+ *
+ * @return string
+ */
+ protected function get_request_search_query() {
+ $search_query = ( ! empty( $_GET['s'] ) ) ? $_GET['s'] : '';
+ return $search_query;
+ }
+
+ /**
+ * Process and return the columns name. This is meant for using with SQL, this means it
+ * always includes the primary key.
+ *
+ * @return array
+ */
+ protected function get_table_columns() {
+ $columns = array_keys( $this->columns );
+ if ( ! in_array( $this->ID, $columns ) ) {
+ $columns[] = $this->ID;
+ }
+
+ return $columns;
+ }
+
+ /**
+ * Check if the current request is doing a "full text" search. If that is the case
+ * prepares the SQL to search texts using LIKE.
+ *
+ * If the current request does not have any search or if this list table does not support
+ * that feature it will return an empty string.
+ *
+ * TODO:
+ * - Improve search doing LIKE by word rather than by phrases.
+ *
+ * @return string
+ */
+ protected function get_items_query_search() {
+ global $wpdb;
+
+ if ( empty( $_GET['s'] ) || empty( $this->search_by ) ) {
+ return '';
+ }
+
+ $filter = array();
+ foreach ( $this->search_by as $column ) {
+ $filter[] = $wpdb->prepare('`' . $column . '` like "%%s%"', $wpdb->esc_like( $_GET['s'] ));
+ }
+ return implode( ' OR ', $filter );
+ }
+
+ /**
+ * Prepares the SQL to filter rows by the options defined at `$this->filter_by`. Before trusting
+ * any data sent by the user it validates that it is a valid option.
+ */
+ protected function get_items_query_filters() {
+ global $wpdb;
+
+ if ( ! $this->filter_by || empty( $_GET['filter_by'] ) || ! is_array( $_GET['filter_by'] ) ) {
+ return '';
+ }
+
+ $filter = array();
+
+ foreach ( $this->filter_by as $column => $options ) {
+ if ( empty( $_GET['filter_by'][ $column ] ) || empty( $options[ $_GET['filter_by'][ $column ] ] ) ) {
+ continue;
+ }
+
+ $filter[] = $wpdb->prepare( "`$column` = %s", $_GET['filter_by'][ $column ] );
+ }
+
+ return implode( ' AND ', $filter );
+
+ }
+
+ /**
+ * Prepares the data to feed WP_Table_List.
+ *
+ * This has the core for selecting, sorting and filting data. To keep the code simple
+ * its logic is split among many methods (get_items_query_*).
+ *
+ * Beside populating the items this function will also count all the records that matches
+ * the filtering criteria and will do fill the pagination variables.
+ */
+ public function prepare_items() {
+ global $wpdb;
+
+ $this->process_bulk_action();
+
+ $this->process_row_actions();
+
+ if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) {
+ // _wp_http_referer is used only on bulk actions, we remove it to keep the $_GET shorter
+ wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
+ exit;
+ }
+
+ $this->prepare_column_headers();
+
+ $limit = $this->get_items_query_limit();
+ $offset = $this->get_items_query_offset();
+ $order = $this->get_items_query_order();
+ $where = array_filter(array(
+ $this->get_items_query_search(),
+ $this->get_items_query_filters(),
+ ));
+ $columns = '`' . implode( '`, `', $this->get_table_columns() ) . '`';
+
+ if ( ! empty( $where ) ) {
+ $where = 'WHERE ('. implode( ') AND (', $where ) . ')';
+ } else {
+ $where = '';
+ }
+
+ $sql = "SELECT $columns FROM {$this->table_name} {$where} {$order} {$limit} {$offset}";
+
+ $this->set_items( $wpdb->get_results( $sql, ARRAY_A ) );
+
+ $query_count = "SELECT COUNT({$this->ID}) FROM {$this->table_name} {$where}";
+ $total_items = $wpdb->get_var( $query_count );
+ $per_page = $this->get_items_per_page( $this->package . '_items_per_page', $this->items_per_page );
+ $this->set_pagination_args( array(
+ 'total_items' => $total_items,
+ 'per_page' => $per_page,
+ 'total_pages' => ceil( $total_items / $per_page ),
+ ) );
+ }
+
+ public function extra_tablenav( $which ) {
+ if ( ! $this->filter_by || 'top' !== $which ) {
+ return;
+ }
+
+ echo '
';
+ }
+
+ /**
+ * Set the data for displaying. It will attempt to unserialize (There is a chance that some columns
+ * are serialized). This can be override in child classes for futher data transformation.
+ */
+ protected function set_items( array $items ) {
+ $this->items = array();
+ foreach ( $items as $item ) {
+ $this->items[ $item[ $this->ID ] ] = array_map( 'maybe_unserialize', $item );
+ }
+ }
+
+ /**
+ * Renders the checkbox for each row, this is the first column and it is named ID regardless
+ * of how the primary key is named (to keep the code simpler). The bulk actions will do the proper
+ * name transformation though using `$this->ID`.
+ */
+ public function column_cb( $row ) {
+ return '';
+ }
+
+ /**
+ * Renders the row-actions.
+ *
+ * This method renders the action menu, it reads the definition from the $row_actions property,
+ * and it checks that the row action method exists before rendering it.
+ *
+ * @param array $row Row to render
+ * @param $column_name Current row
+ * @return
+ */
+ protected function maybe_render_actions( $row, $column_name ) {
+ if ( empty( $this->row_actions[ $column_name ] ) ) {
+ return;
+ }
+
+ $row_id = $row[ $this->ID ];
+
+ $actions = '
';
+ }
+ }
+
+ /**
+ * Renders the table list, we override the original class to render the table inside a form
+ * and to render any needed HTML (like the search box). By doing so the callee of a function can simple
+ * forget about any extra HTML.
+ */
+ protected function display_table() {
+ echo '';
+ }
+
+ /**
+ * Process any pending actions.
+ */
+ public function process_actions() {
+ $this->process_bulk_action();
+ $this->process_row_actions();
+
+ if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) {
+ // _wp_http_referer is used only on bulk actions, we remove it to keep the $_GET shorter
+ wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
+ exit;
+ }
+ }
+
+ /**
+ * Render the list table page, including header, notices, status filters and table.
+ */
+ public function display_page() {
+ $this->prepare_items();
+
+ echo '
';
+ }
+
+ /**
+ * Get the text to display in the search box on the list table.
+ */
+ protected function get_search_box_placeholder() {
+ return esc_html__( 'Search', 'action-scheduler' );
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php
new file mode 100644
index 00000000..82ecbc67
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php
@@ -0,0 +1,240 @@
+created_time = microtime( true );
+
+ $this->store = $store ? $store : ActionScheduler_Store::instance();
+ $this->monitor = $monitor ? $monitor : new ActionScheduler_FatalErrorMonitor( $this->store );
+ $this->cleaner = $cleaner ? $cleaner : new ActionScheduler_QueueCleaner( $this->store );
+ }
+
+ /**
+ * Process an individual action.
+ *
+ * @param int $action_id The action ID to process.
+ * @param string $context Optional identifer for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
+ * Generally, this should be capitalised and not localised as it's a proper noun.
+ */
+ public function process_action( $action_id, $context = '' ) {
+ try {
+ $valid_action = false;
+ do_action( 'action_scheduler_before_execute', $action_id, $context );
+
+ if ( ActionScheduler_Store::STATUS_PENDING !== $this->store->get_status( $action_id ) ) {
+ do_action( 'action_scheduler_execution_ignored', $action_id, $context );
+ return;
+ }
+
+ $valid_action = true;
+ do_action( 'action_scheduler_begin_execute', $action_id, $context );
+
+ $action = $this->store->fetch_action( $action_id );
+ $this->store->log_execution( $action_id );
+ $action->execute();
+ do_action( 'action_scheduler_after_execute', $action_id, $action, $context );
+ $this->store->mark_complete( $action_id );
+ } catch ( Exception $e ) {
+ if ( $valid_action ) {
+ $this->store->mark_failure( $action_id );
+ do_action( 'action_scheduler_failed_execution', $action_id, $e, $context );
+ } else {
+ do_action( 'action_scheduler_failed_validation', $action_id, $e, $context );
+ }
+ }
+
+ if ( isset( $action ) && is_a( $action, 'ActionScheduler_Action' ) && $action->get_schedule()->is_recurring() ) {
+ $this->schedule_next_instance( $action, $action_id );
+ }
+ }
+
+ /**
+ * Schedule the next instance of the action if necessary.
+ *
+ * @param ActionScheduler_Action $action
+ * @param int $action_id
+ */
+ protected function schedule_next_instance( ActionScheduler_Action $action, $action_id ) {
+ try {
+ ActionScheduler::factory()->repeat( $action );
+ } catch ( Exception $e ) {
+ do_action( 'action_scheduler_failed_to_schedule_next_instance', $action_id, $e, $action );
+ }
+ }
+
+ /**
+ * Run the queue cleaner.
+ *
+ * @author Jeremy Pry
+ */
+ protected function run_cleanup() {
+ $this->cleaner->clean( 10 * $this->get_time_limit() );
+ }
+
+ /**
+ * Get the number of concurrent batches a runner allows.
+ *
+ * @return int
+ */
+ public function get_allowed_concurrent_batches() {
+ return apply_filters( 'action_scheduler_queue_runner_concurrent_batches', 1 );
+ }
+
+ /**
+ * Check if the number of allowed concurrent batches is met or exceeded.
+ *
+ * @return bool
+ */
+ public function has_maximum_concurrent_batches() {
+ return $this->store->get_claim_count() >= $this->get_allowed_concurrent_batches();
+ }
+
+ /**
+ * Get the maximum number of seconds a batch can run for.
+ *
+ * @return int The number of seconds.
+ */
+ protected function get_time_limit() {
+
+ $time_limit = 30;
+
+ // Apply deprecated filter from deprecated get_maximum_execution_time() method
+ if ( has_filter( 'action_scheduler_maximum_execution_time' ) ) {
+ _deprecated_function( 'action_scheduler_maximum_execution_time', '2.1.1', 'action_scheduler_queue_runner_time_limit' );
+ $time_limit = apply_filters( 'action_scheduler_maximum_execution_time', $time_limit );
+ }
+
+ return absint( apply_filters( 'action_scheduler_queue_runner_time_limit', $time_limit ) );
+ }
+
+ /**
+ * Get the number of seconds the process has been running.
+ *
+ * @return int The number of seconds.
+ */
+ protected function get_execution_time() {
+ $execution_time = microtime( true ) - $this->created_time;
+
+ // Get the CPU time if the hosting environment uses it rather than wall-clock time to calculate a process's execution time.
+ if ( function_exists( 'getrusage' ) && apply_filters( 'action_scheduler_use_cpu_execution_time', defined( 'PANTHEON_ENVIRONMENT' ) ) ) {
+ $resource_usages = getrusage();
+
+ if ( isset( $resource_usages['ru_stime.tv_usec'], $resource_usages['ru_stime.tv_usec'] ) ) {
+ $execution_time = $resource_usages['ru_stime.tv_sec'] + ( $resource_usages['ru_stime.tv_usec'] / 1000000 );
+ }
+ }
+
+ return $execution_time;
+ }
+
+ /**
+ * Check if the host's max execution time is (likely) to be exceeded if processing more actions.
+ *
+ * @param int $processed_actions The number of actions processed so far - used to determine the likelihood of exceeding the time limit if processing another action
+ * @return bool
+ */
+ protected function time_likely_to_be_exceeded( $processed_actions ) {
+
+ $execution_time = $this->get_execution_time();
+ $max_execution_time = $this->get_time_limit();
+ $time_per_action = $execution_time / $processed_actions;
+ $estimated_time = $execution_time + ( $time_per_action * 3 );
+ $likely_to_be_exceeded = $estimated_time > $max_execution_time;
+
+ return apply_filters( 'action_scheduler_maximum_execution_time_likely_to_be_exceeded', $likely_to_be_exceeded, $this, $processed_actions, $execution_time, $max_execution_time );
+ }
+
+ /**
+ * Get memory limit
+ *
+ * Based on WP_Background_Process::get_memory_limit()
+ *
+ * @return int
+ */
+ protected function get_memory_limit() {
+ if ( function_exists( 'ini_get' ) ) {
+ $memory_limit = ini_get( 'memory_limit' );
+ } else {
+ $memory_limit = '128M'; // Sensible default, and minimum required by WooCommerce
+ }
+
+ if ( ! $memory_limit || -1 === $memory_limit || '-1' === $memory_limit ) {
+ // Unlimited, set to 32GB.
+ $memory_limit = '32G';
+ }
+
+ return ActionScheduler_Compatibility::convert_hr_to_bytes( $memory_limit );
+ }
+
+ /**
+ * Memory exceeded
+ *
+ * Ensures the batch process never exceeds 90% of the maximum WordPress memory.
+ *
+ * Based on WP_Background_Process::memory_exceeded()
+ *
+ * @return bool
+ */
+ protected function memory_exceeded() {
+
+ $memory_limit = $this->get_memory_limit() * 0.90;
+ $current_memory = memory_get_usage( true );
+ $memory_exceeded = $current_memory >= $memory_limit;
+
+ return apply_filters( 'action_scheduler_memory_exceeded', $memory_exceeded, $this );
+ }
+
+ /**
+ * See if the batch limits have been exceeded, which is when memory usage is almost at
+ * the maximum limit, or the time to process more actions will exceed the max time limit.
+ *
+ * Based on WC_Background_Process::batch_limits_exceeded()
+ *
+ * @param int $processed_actions The number of actions processed so far - used to determine the likelihood of exceeding the time limit if processing another action
+ * @return bool
+ */
+ protected function batch_limits_exceeded( $processed_actions ) {
+ return $this->memory_exceeded() || $this->time_likely_to_be_exceeded( $processed_actions );
+ }
+
+ /**
+ * Process actions in the queue.
+ *
+ * @author Jeremy Pry
+ * @param string $context Optional identifer for the context in which this action is being processed, e.g. 'WP CLI' or 'WP Cron'
+ * Generally, this should be capitalised and not localised as it's a proper noun.
+ * @return int The number of actions processed.
+ */
+ abstract public function run( $context = '' );
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_RecurringSchedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_RecurringSchedule.php
new file mode 100644
index 00000000..131d4757
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_RecurringSchedule.php
@@ -0,0 +1,102 @@
+start - and logic to calculate the next run date after
+ * that - @see $this->calculate_next(). The $first_date property also keeps a record of when the very
+ * first instance of this chain of schedules ran.
+ *
+ * @var DateTime
+ */
+ private $first_date = NULL;
+
+ /**
+ * Timestamp equivalent of @see $this->first_date
+ *
+ * @var int
+ */
+ protected $first_timestamp = NULL;
+
+ /**
+ * The recurrance between each time an action is run using this schedule.
+ * Used to calculate the start date & time. Can be a number of seconds, in the
+ * case of ActionScheduler_IntervalSchedule, or a cron expression, as in the
+ * case of ActionScheduler_CronSchedule. Or something else.
+ *
+ * @var mixed
+ */
+ protected $recurrence;
+
+ /**
+ * @param DateTime $date The date & time to run the action.
+ * @param mixed $recurrence The data used to determine the schedule's recurrance.
+ * @param DateTime|null $first (Optional) The date & time the first instance of this interval schedule ran. Default null, meaning this is the first instance.
+ */
+ public function __construct( DateTime $date, $recurrence, DateTime $first = null ) {
+ parent::__construct( $date );
+ $this->first_date = empty( $first ) ? $date : $first;
+ $this->recurrence = $recurrence;
+ }
+
+ /**
+ * @return bool
+ */
+ public function is_recurring() {
+ return true;
+ }
+
+ /**
+ * Get the date & time of the first schedule in this recurring series.
+ *
+ * @return DateTime|null
+ */
+ public function get_first_date() {
+ return clone $this->first_date;
+ }
+
+ /**
+ * @return string
+ */
+ public function get_recurrence() {
+ return $this->recurrence;
+ }
+
+ /**
+ * For PHP 5.2 compat, since DateTime objects can't be serialized
+ * @return array
+ */
+ public function __sleep() {
+ $sleep_params = parent::__sleep();
+ $this->first_timestamp = $this->first_date->getTimestamp();
+ return array_merge( $sleep_params, array(
+ 'first_timestamp',
+ 'recurrence'
+ ) );
+ }
+
+ /**
+ * Unserialize recurring schedules serialized/stored prior to AS 3.0.0
+ *
+ * Prior to Action Scheduler 3.0.0, schedules used different property names to refer
+ * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
+ * was the same as ActionScheduler_SimpleSchedule::timestamp. This was addressed in
+ * Action Scheduler 3.0.0, where properties and property names were aligned for better
+ * inheritance. To maintain backward compatibility with scheduled serialized and stored
+ * prior to 3.0, we need to correctly map the old property names.
+ */
+ public function __wakeup() {
+ parent::__wakeup();
+ if ( $this->first_timestamp > 0 ) {
+ $this->first_date = as_get_datetime_object( $this->first_timestamp );
+ } else {
+ $this->first_date = $this->get_date();
+ }
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schedule.php
new file mode 100644
index 00000000..2631ef55
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schedule.php
@@ -0,0 +1,83 @@
+scheduled_date
+ *
+ * @var int
+ */
+ protected $scheduled_timestamp = NULL;
+
+ /**
+ * @param DateTime $date The date & time to run the action.
+ */
+ public function __construct( DateTime $date ) {
+ $this->scheduled_date = $date;
+ }
+
+ /**
+ * Check if a schedule should recur.
+ *
+ * @return bool
+ */
+ abstract public function is_recurring();
+
+ /**
+ * Calculate when the next instance of this schedule would run based on a given date & time.
+ *
+ * @param DateTime $after
+ * @return DateTime
+ */
+ abstract protected function calculate_next( DateTime $after );
+
+ /**
+ * Get the next date & time when this schedule should run after a given date & time.
+ *
+ * @param DateTime $after
+ * @return DateTime|null
+ */
+ public function get_next( DateTime $after ) {
+ $after = clone $after;
+ if ( $after > $this->scheduled_date ) {
+ $after = $this->calculate_next( $after );
+ return $after;
+ }
+ return clone $this->scheduled_date;
+ }
+
+ /**
+ * Get the date & time the schedule is set to run.
+ *
+ * @return DateTime|null
+ */
+ public function get_date() {
+ return $this->scheduled_date;
+ }
+
+ /**
+ * For PHP 5.2 compat, since DateTime objects can't be serialized
+ * @return array
+ */
+ public function __sleep() {
+ $this->scheduled_timestamp = $this->scheduled_date->getTimestamp();
+ return array(
+ 'scheduled_timestamp',
+ );
+ }
+
+ public function __wakeup() {
+ $this->scheduled_date = as_get_datetime_object( $this->scheduled_timestamp );
+ unset( $this->scheduled_timestamp );
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schema.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schema.php
new file mode 100644
index 00000000..62699c7c
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Abstract_Schema.php
@@ -0,0 +1,135 @@
+tables as $table ) {
+ $wpdb->tables[] = $table;
+ $name = $this->get_full_table_name( $table );
+ $wpdb->$table = $name;
+ }
+
+ // create the tables
+ if ( $this->schema_update_required() || $force_update ) {
+ foreach ( $this->tables as $table ) {
+ $this->update_table( $table );
+ }
+ $this->mark_schema_update_complete();
+ }
+ }
+
+ /**
+ * @param string $table The name of the table
+ *
+ * @return string The CREATE TABLE statement, suitable for passing to dbDelta
+ */
+ abstract protected function get_table_definition( $table );
+
+ /**
+ * Determine if the database schema is out of date
+ * by comparing the integer found in $this->schema_version
+ * with the option set in the WordPress options table
+ *
+ * @return bool
+ */
+ private function schema_update_required() {
+ $option_name = 'schema-' . static::class;
+ $version_found_in_db = get_option( $option_name, 0 );
+
+ // Check for schema option stored by the Action Scheduler Custom Tables plugin in case site has migrated from that plugin with an older schema
+ if ( 0 === $version_found_in_db ) {
+
+ $plugin_option_name = 'schema-';
+
+ switch ( static::class ) {
+ case 'ActionScheduler_StoreSchema' :
+ $plugin_option_name .= 'Action_Scheduler\Custom_Tables\DB_Store_Table_Maker';
+ break;
+ case 'ActionScheduler_LoggerSchema' :
+ $plugin_option_name .= 'Action_Scheduler\Custom_Tables\DB_Logger_Table_Maker';
+ break;
+ }
+
+ $version_found_in_db = get_option( $plugin_option_name, 0 );
+
+ delete_option( $plugin_option_name );
+ }
+
+ return version_compare( $version_found_in_db, $this->schema_version, '<' );
+ }
+
+ /**
+ * Update the option in WordPress to indicate that
+ * our schema is now up to date
+ *
+ * @return void
+ */
+ private function mark_schema_update_complete() {
+ $option_name = 'schema-' . static::class;
+
+ // work around race conditions and ensure that our option updates
+ $value_to_save = (string) $this->schema_version . '.0.' . time();
+
+ update_option( $option_name, $value_to_save );
+ }
+
+ /**
+ * Update the schema for the given table
+ *
+ * @param string $table The name of the table to update
+ *
+ * @return void
+ */
+ private function update_table( $table ) {
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
+ $definition = $this->get_table_definition( $table );
+ if ( $definition ) {
+ $updated = dbDelta( $definition );
+ foreach ( $updated as $updated_table => $update_description ) {
+ if ( strpos( $update_description, 'Created table' ) === 0 ) {
+ do_action( 'action_scheduler/created_table', $updated_table, $table );
+ }
+ }
+ }
+ }
+
+ /**
+ * @param string $table
+ *
+ * @return string The full name of the table, including the
+ * table prefix for the current blog
+ */
+ protected function get_full_table_name( $table ) {
+ return $GLOBALS[ 'wpdb' ]->prefix . $table;
+ }
+}
\ No newline at end of file
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Lock.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Lock.php
new file mode 100644
index 00000000..86e85285
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Lock.php
@@ -0,0 +1,62 @@
+get_expiration( $lock_type ) >= time() );
+ }
+
+ /**
+ * Set a lock.
+ *
+ * @param string $lock_type A string to identify different lock types.
+ * @return bool
+ */
+ abstract public function set( $lock_type );
+
+ /**
+ * If a lock is set, return the timestamp it was set to expiry.
+ *
+ * @param string $lock_type A string to identify different lock types.
+ * @return bool|int False if no lock is set, otherwise the timestamp for when the lock is set to expire.
+ */
+ abstract public function get_expiration( $lock_type );
+
+ /**
+ * Get the amount of time to set for a given lock. 60 seconds by default.
+ *
+ * @param string $lock_type A string to identify different lock types.
+ * @return int
+ */
+ protected function get_duration( $lock_type ) {
+ return apply_filters( 'action_scheduler_lock_duration', self::$lock_duration, $lock_type );
+ }
+
+ /**
+ * @return ActionScheduler_Lock
+ */
+ public static function instance() {
+ if ( empty( self::$locker ) ) {
+ $class = apply_filters( 'action_scheduler_lock_class', 'ActionScheduler_OptionLock' );
+ self::$locker = new $class();
+ }
+ return self::$locker;
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Logger.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Logger.php
new file mode 100644
index 00000000..3e7252c5
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Logger.php
@@ -0,0 +1,176 @@
+hook_stored_action();
+ add_action( 'action_scheduler_canceled_action', array( $this, 'log_canceled_action' ), 10, 1 );
+ add_action( 'action_scheduler_begin_execute', array( $this, 'log_started_action' ), 10, 2 );
+ add_action( 'action_scheduler_after_execute', array( $this, 'log_completed_action' ), 10, 3 );
+ add_action( 'action_scheduler_failed_execution', array( $this, 'log_failed_action' ), 10, 3 );
+ add_action( 'action_scheduler_failed_action', array( $this, 'log_timed_out_action' ), 10, 2 );
+ add_action( 'action_scheduler_unexpected_shutdown', array( $this, 'log_unexpected_shutdown' ), 10, 2 );
+ add_action( 'action_scheduler_reset_action', array( $this, 'log_reset_action' ), 10, 1 );
+ add_action( 'action_scheduler_execution_ignored', array( $this, 'log_ignored_action' ), 10, 2 );
+ add_action( 'action_scheduler_failed_fetch_action', array( $this, 'log_failed_fetch_action' ), 10, 2 );
+ add_action( 'action_scheduler_failed_to_schedule_next_instance', array( $this, 'log_failed_schedule_next_instance' ), 10, 2 );
+ add_action( 'action_scheduler_bulk_cancel_actions', array( $this, 'bulk_log_cancel_actions' ), 10, 1 );
+ }
+
+ public function hook_stored_action() {
+ add_action( 'action_scheduler_stored_action', array( $this, 'log_stored_action' ) );
+ }
+
+ public function unhook_stored_action() {
+ remove_action( 'action_scheduler_stored_action', array( $this, 'log_stored_action' ) );
+ }
+
+ public function log_stored_action( $action_id ) {
+ $this->log( $action_id, __( 'action created', 'action-scheduler' ) );
+ }
+
+ public function log_canceled_action( $action_id ) {
+ $this->log( $action_id, __( 'action canceled', 'action-scheduler' ) );
+ }
+
+ public function log_started_action( $action_id, $context = '' ) {
+ if ( ! empty( $context ) ) {
+ /* translators: %s: context */
+ $message = sprintf( __( 'action started via %s', 'action-scheduler' ), $context );
+ } else {
+ $message = __( 'action started', 'action-scheduler' );
+ }
+ $this->log( $action_id, $message );
+ }
+
+ public function log_completed_action( $action_id, $action = NULL, $context = '' ) {
+ if ( ! empty( $context ) ) {
+ /* translators: %s: context */
+ $message = sprintf( __( 'action complete via %s', 'action-scheduler' ), $context );
+ } else {
+ $message = __( 'action complete', 'action-scheduler' );
+ }
+ $this->log( $action_id, $message );
+ }
+
+ public function log_failed_action( $action_id, Exception $exception, $context = '' ) {
+ if ( ! empty( $context ) ) {
+ /* translators: 1: context 2: exception message */
+ $message = sprintf( __( 'action failed via %1$s: %2$s', 'action-scheduler' ), $context, $exception->getMessage() );
+ } else {
+ /* translators: %s: exception message */
+ $message = sprintf( __( 'action failed: %s', 'action-scheduler' ), $exception->getMessage() );
+ }
+ $this->log( $action_id, $message );
+ }
+
+ public function log_timed_out_action( $action_id, $timeout ) {
+ /* translators: %s: amount of time */
+ $this->log( $action_id, sprintf( __( 'action timed out after %s seconds', 'action-scheduler' ), $timeout ) );
+ }
+
+ public function log_unexpected_shutdown( $action_id, $error ) {
+ if ( ! empty( $error ) ) {
+ /* translators: 1: error message 2: filename 3: line */
+ $this->log( $action_id, sprintf( __( 'unexpected shutdown: PHP Fatal error %1$s in %2$s on line %3$s', 'action-scheduler' ), $error['message'], $error['file'], $error['line'] ) );
+ }
+ }
+
+ public function log_reset_action( $action_id ) {
+ $this->log( $action_id, __( 'action reset', 'action-scheduler' ) );
+ }
+
+ public function log_ignored_action( $action_id, $context = '' ) {
+ if ( ! empty( $context ) ) {
+ /* translators: %s: context */
+ $message = sprintf( __( 'action ignored via %s', 'action-scheduler' ), $context );
+ } else {
+ $message = __( 'action ignored', 'action-scheduler' );
+ }
+ $this->log( $action_id, $message );
+ }
+
+ /**
+ * @param string $action_id
+ * @param Exception|NULL $exception The exception which occured when fetching the action. NULL by default for backward compatibility.
+ *
+ * @return ActionScheduler_LogEntry[]
+ */
+ public function log_failed_fetch_action( $action_id, Exception $exception = NULL ) {
+
+ if ( ! is_null( $exception ) ) {
+ /* translators: %s: exception message */
+ $log_message = sprintf( __( 'There was a failure fetching this action: %s', 'action-scheduler' ), $exception->getMessage() );
+ } else {
+ $log_message = __( 'There was a failure fetching this action', 'action-scheduler' );
+ }
+
+ $this->log( $action_id, $log_message );
+ }
+
+ public function log_failed_schedule_next_instance( $action_id, Exception $exception ) {
+ /* translators: %s: exception message */
+ $this->log( $action_id, sprintf( __( 'There was a failure scheduling the next instance of this action: %s', 'action-scheduler' ), $exception->getMessage() ) );
+ }
+
+ /**
+ * Bulk add cancel action log entries.
+ *
+ * Implemented here for backward compatibility. Should be implemented in parent loggers
+ * for more performant bulk logging.
+ *
+ * @param array $action_ids List of action ID.
+ */
+ public function bulk_log_cancel_actions( $action_ids ) {
+ if ( empty( $action_ids ) ) {
+ return;
+ }
+
+ foreach ( $action_ids as $action_id ) {
+ $this->log_canceled_action( $action_id );
+ }
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Store.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Store.php
new file mode 100644
index 00000000..95b5ee71
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_Store.php
@@ -0,0 +1,345 @@
+', '>=', '<', '<=', '=') ) ) {
+ return $comparison_operator;
+ }
+ return '=';
+ }
+
+ /**
+ * Get the time MySQL formated date/time string for an action's (next) scheduled date.
+ *
+ * @param ActionScheduler_Action $action
+ * @param DateTime $scheduled_date (optional)
+ * @return string
+ */
+ protected function get_scheduled_date_string( ActionScheduler_Action $action, DateTime $scheduled_date = NULL ) {
+ $next = null === $scheduled_date ? $action->get_schedule()->get_date() : $scheduled_date;
+ if ( ! $next ) {
+ return '0000-00-00 00:00:00';
+ }
+ $next->setTimezone( new DateTimeZone( 'UTC' ) );
+
+ return $next->format( 'Y-m-d H:i:s' );
+ }
+
+ /**
+ * Get the time MySQL formated date/time string for an action's (next) scheduled date.
+ *
+ * @param ActionScheduler_Action $action
+ * @param DateTime $scheduled_date (optional)
+ * @return string
+ */
+ protected function get_scheduled_date_string_local( ActionScheduler_Action $action, DateTime $scheduled_date = NULL ) {
+ $next = null === $scheduled_date ? $action->get_schedule()->get_date() : $scheduled_date;
+ if ( ! $next ) {
+ return '0000-00-00 00:00:00';
+ }
+
+ ActionScheduler_TimezoneHelper::set_local_timezone( $next );
+ return $next->format( 'Y-m-d H:i:s' );
+ }
+
+ /**
+ * Validate that we could decode action arguments.
+ *
+ * @param mixed $args The decoded arguments.
+ * @param int $action_id The action ID.
+ *
+ * @throws ActionScheduler_InvalidActionException When the decoded arguments are invalid.
+ */
+ protected function validate_args( $args, $action_id ) {
+ // Ensure we have an array of args.
+ if ( ! is_array( $args ) ) {
+ throw ActionScheduler_InvalidActionException::from_decoding_args( $action_id );
+ }
+
+ // Validate JSON decoding if possible.
+ if ( function_exists( 'json_last_error' ) && JSON_ERROR_NONE !== json_last_error() ) {
+ throw ActionScheduler_InvalidActionException::from_decoding_args( $action_id, $args );
+ }
+ }
+
+ /**
+ * Validate a ActionScheduler_Schedule object.
+ *
+ * @param mixed $schedule The unserialized ActionScheduler_Schedule object.
+ * @param int $action_id The action ID.
+ *
+ * @throws ActionScheduler_InvalidActionException When the schedule is invalid.
+ */
+ protected function validate_schedule( $schedule, $action_id ) {
+ if ( empty( $schedule ) || ! is_a( $schedule, 'ActionScheduler_Schedule' ) ) {
+ throw ActionScheduler_InvalidActionException::from_schedule( $action_id, $schedule );
+ }
+ }
+
+ /**
+ * InnoDB indexes have a maximum size of 767 bytes by default, which is only 191 characters with utf8mb4.
+ *
+ * Previously, AS wasn't concerned about args length, as we used the (unindex) post_content column. However,
+ * with custom tables, we use an indexed VARCHAR column instead.
+ *
+ * @param ActionScheduler_Action $action Action to be validated.
+ * @throws InvalidArgumentException When json encoded args is too long.
+ */
+ protected function validate_action( ActionScheduler_Action $action ) {
+ if ( strlen( json_encode( $action->get_args() ) ) > static::$max_args_length ) {
+ throw new InvalidArgumentException( sprintf( __( 'ActionScheduler_Action::$args too long. To ensure the args column can be indexed, action args should not be more than %d characters when encoded as JSON.', 'action-scheduler' ), static::$max_args_length ) );
+ }
+ }
+
+ /**
+ * Cancel pending actions by hook.
+ *
+ * @since 3.0.0
+ *
+ * @param string $hook Hook name.
+ *
+ * @return void
+ */
+ public function cancel_actions_by_hook( $hook ) {
+ $action_ids = true;
+ while ( ! empty( $action_ids ) ) {
+ $action_ids = $this->query_actions(
+ array(
+ 'hook' => $hook,
+ 'status' => self::STATUS_PENDING,
+ 'per_page' => 1000,
+ )
+ );
+
+ $this->bulk_cancel_actions( $action_ids );
+ }
+ }
+
+ /**
+ * Cancel pending actions by group.
+ *
+ * @since 3.0.0
+ *
+ * @param string $group Group slug.
+ *
+ * @return void
+ */
+ public function cancel_actions_by_group( $group ) {
+ $action_ids = true;
+ while ( ! empty( $action_ids ) ) {
+ $action_ids = $this->query_actions(
+ array(
+ 'group' => $group,
+ 'status' => self::STATUS_PENDING,
+ 'per_page' => 1000,
+ )
+ );
+
+ $this->bulk_cancel_actions( $action_ids );
+ }
+ }
+
+ /**
+ * Cancel a set of action IDs.
+ *
+ * @since 3.0.0
+ *
+ * @param array $action_ids List of action IDs.
+ *
+ * @return void
+ */
+ private function bulk_cancel_actions( $action_ids ) {
+ foreach ( $action_ids as $action_id ) {
+ $this->cancel_action( $action_id );
+ }
+
+ do_action( 'action_scheduler_bulk_cancel_actions', $action_ids );
+ }
+
+ /**
+ * @return array
+ */
+ public function get_status_labels() {
+ return array(
+ self::STATUS_COMPLETE => __( 'Complete', 'action-scheduler' ),
+ self::STATUS_PENDING => __( 'Pending', 'action-scheduler' ),
+ self::STATUS_RUNNING => __( 'In-progress', 'action-scheduler' ),
+ self::STATUS_FAILED => __( 'Failed', 'action-scheduler' ),
+ self::STATUS_CANCELED => __( 'Canceled', 'action-scheduler' ),
+ );
+ }
+
+ /**
+ * Check if there are any pending scheduled actions due to run.
+ *
+ * @param ActionScheduler_Action $action
+ * @param DateTime $scheduled_date (optional)
+ * @return string
+ */
+ public function has_pending_actions_due() {
+ $pending_actions = $this->query_actions( array(
+ 'date' => as_get_datetime_object(),
+ 'status' => ActionScheduler_Store::STATUS_PENDING,
+ ) );
+
+ return ! empty( $pending_actions );
+ }
+
+ /**
+ * Callable initialization function optionally overridden in derived classes.
+ */
+ public function init() {}
+
+ /**
+ * Callable function to mark an action as migrated optionally overridden in derived classes.
+ */
+ public function mark_migrated( $action_id ) {}
+
+ /**
+ * @return ActionScheduler_Store
+ */
+ public static function instance() {
+ if ( empty( self::$store ) ) {
+ $class = apply_filters( 'action_scheduler_store_class', self::DEFAULT_CLASS );
+ self::$store = new $class();
+ }
+ return self::$store;
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_TimezoneHelper.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_TimezoneHelper.php
new file mode 100644
index 00000000..fd014494
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler_TimezoneHelper.php
@@ -0,0 +1,152 @@
+format( 'U' ) );
+ }
+
+ if ( get_option( 'timezone_string' ) ) {
+ $date->setTimezone( new DateTimeZone( self::get_local_timezone_string() ) );
+ } else {
+ $date->setUtcOffset( self::get_local_timezone_offset() );
+ }
+
+ return $date;
+ }
+
+ /**
+ * Helper to retrieve the timezone string for a site until a WP core method exists
+ * (see https://core.trac.wordpress.org/ticket/24730).
+ *
+ * Adapted from wc_timezone_string() and https://secure.php.net/manual/en/function.timezone-name-from-abbr.php#89155.
+ *
+ * If no timezone string is set, and its not possible to match the UTC offset set for the site to a timezone
+ * string, then an empty string will be returned, and the UTC offset should be used to set a DateTime's
+ * timezone.
+ *
+ * @since 2.1.0
+ * @return string PHP timezone string for the site or empty if no timezone string is available.
+ */
+ protected static function get_local_timezone_string( $reset = false ) {
+ // If site timezone string exists, return it.
+ $timezone = get_option( 'timezone_string' );
+ if ( $timezone ) {
+ return $timezone;
+ }
+
+ // Get UTC offset, if it isn't set then return UTC.
+ $utc_offset = intval( get_option( 'gmt_offset', 0 ) );
+ if ( 0 === $utc_offset ) {
+ return 'UTC';
+ }
+
+ // Adjust UTC offset from hours to seconds.
+ $utc_offset *= 3600;
+
+ // Attempt to guess the timezone string from the UTC offset.
+ $timezone = timezone_name_from_abbr( '', $utc_offset );
+ if ( $timezone ) {
+ return $timezone;
+ }
+
+ // Last try, guess timezone string manually.
+ foreach ( timezone_abbreviations_list() as $abbr ) {
+ foreach ( $abbr as $city ) {
+ if ( (bool) date( 'I' ) === (bool) $city['dst'] && $city['timezone_id'] && intval( $city['offset'] ) === $utc_offset ) {
+ return $city['timezone_id'];
+ }
+ }
+ }
+
+ // No timezone string
+ return '';
+ }
+
+ /**
+ * Get timezone offset in seconds.
+ *
+ * @since 2.1.0
+ * @return float
+ */
+ protected static function get_local_timezone_offset() {
+ $timezone = get_option( 'timezone_string' );
+
+ if ( $timezone ) {
+ $timezone_object = new DateTimeZone( $timezone );
+ return $timezone_object->getOffset( new DateTime( 'now' ) );
+ } else {
+ return floatval( get_option( 'gmt_offset', 0 ) ) * HOUR_IN_SECONDS;
+ }
+ }
+
+ /**
+ * @deprecated 2.1.0
+ */
+ public static function get_local_timezone( $reset = FALSE ) {
+ _deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' );
+ if ( $reset ) {
+ self::$local_timezone = NULL;
+ }
+ if ( !isset(self::$local_timezone) ) {
+ $tzstring = get_option('timezone_string');
+
+ if ( empty($tzstring) ) {
+ $gmt_offset = get_option('gmt_offset');
+ if ( $gmt_offset == 0 ) {
+ $tzstring = 'UTC';
+ } else {
+ $gmt_offset *= HOUR_IN_SECONDS;
+ $tzstring = timezone_name_from_abbr( '', $gmt_offset, 1 );
+
+ // If there's no timezone string, try again with no DST.
+ if ( false === $tzstring ) {
+ $tzstring = timezone_name_from_abbr( '', $gmt_offset, 0 );
+ }
+
+ // Try mapping to the first abbreviation we can find.
+ if ( false === $tzstring ) {
+ $is_dst = date( 'I' );
+ foreach ( timezone_abbreviations_list() as $abbr ) {
+ foreach ( $abbr as $city ) {
+ if ( $city['dst'] == $is_dst && $city['offset'] == $gmt_offset ) {
+ // If there's no valid timezone ID, keep looking.
+ if ( null === $city['timezone_id'] ) {
+ continue;
+ }
+
+ $tzstring = $city['timezone_id'];
+ break 2;
+ }
+ }
+ }
+ }
+
+ // If we still have no valid string, then fall back to UTC.
+ if ( false === $tzstring ) {
+ $tzstring = 'UTC';
+ }
+ }
+ }
+
+ self::$local_timezone = new DateTimeZone($tzstring);
+ }
+ return self::$local_timezone;
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_Action.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_Action.php
new file mode 100644
index 00000000..6258ba16
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_Action.php
@@ -0,0 +1,75 @@
+set_hook($hook);
+ $this->set_schedule($schedule);
+ $this->set_args($args);
+ $this->set_group($group);
+ }
+
+ public function execute() {
+ return do_action_ref_array($this->get_hook(), $this->get_args());
+ }
+
+ /**
+ * @param string $hook
+ */
+ protected function set_hook( $hook ) {
+ $this->hook = $hook;
+ }
+
+ public function get_hook() {
+ return $this->hook;
+ }
+
+ protected function set_schedule( ActionScheduler_Schedule $schedule ) {
+ $this->schedule = $schedule;
+ }
+
+ /**
+ * @return ActionScheduler_Schedule
+ */
+ public function get_schedule() {
+ return $this->schedule;
+ }
+
+ protected function set_args( array $args ) {
+ $this->args = $args;
+ }
+
+ public function get_args() {
+ return $this->args;
+ }
+
+ /**
+ * @param string $group
+ */
+ protected function set_group( $group ) {
+ $this->group = $group;
+ }
+
+ /**
+ * @return string
+ */
+ public function get_group() {
+ return $this->group;
+ }
+
+ /**
+ * @return bool If the action has been finished
+ */
+ public function is_finished() {
+ return FALSE;
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_CanceledAction.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_CanceledAction.php
new file mode 100644
index 00000000..8bbc5d18
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_CanceledAction.php
@@ -0,0 +1,23 @@
+set_schedule( new ActionScheduler_NullSchedule() );
+ }
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_FinishedAction.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_FinishedAction.php
new file mode 100644
index 00000000..b23a56c6
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/actions/ActionScheduler_FinishedAction.php
@@ -0,0 +1,16 @@
+set_schedule( new ActionScheduler_NullSchedule() );
+ }
+
+ public function execute() {
+ // don't execute
+ }
+}
+
\ No newline at end of file
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php
new file mode 100644
index 00000000..d21e8696
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBLogger.php
@@ -0,0 +1,146 @@
+format( 'Y-m-d H:i:s' );
+ ActionScheduler_TimezoneHelper::set_local_timezone( $date );
+ $date_local = $date->format( 'Y-m-d H:i:s' );
+
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $wpdb->insert( $wpdb->actionscheduler_logs, [
+ 'action_id' => $action_id,
+ 'message' => $message,
+ 'log_date_gmt' => $date_gmt,
+ 'log_date_local' => $date_local,
+ ], [ '%d', '%s', '%s', '%s' ] );
+
+ return $wpdb->insert_id;
+ }
+
+ /**
+ * Retrieve an action log entry.
+ *
+ * @param int $entry_id Log entry ID.
+ *
+ * @return ActionScheduler_LogEntry
+ */
+ public function get_entry( $entry_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $entry = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->actionscheduler_logs} WHERE log_id=%d", $entry_id ) );
+
+ return $this->create_entry_from_db_record( $entry );
+ }
+
+ /**
+ * Create an action log entry from a database record.
+ *
+ * @param object $record Log entry database record object.
+ *
+ * @return ActionScheduler_LogEntry
+ */
+ private function create_entry_from_db_record( $record ) {
+ if ( empty( $record ) ) {
+ return new ActionScheduler_NullLogEntry();
+ }
+
+ $date = as_get_datetime_object( $record->log_date_gmt );
+
+ return new ActionScheduler_LogEntry( $record->action_id, $record->message, $date );
+ }
+
+ /**
+ * Retrieve the an action's log entries from the database.
+ *
+ * @param int $action_id Action ID.
+ *
+ * @return ActionScheduler_LogEntry[]
+ */
+ public function get_logs( $action_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+
+ $records = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->actionscheduler_logs} WHERE action_id=%d", $action_id ) );
+
+ return array_map( [ $this, 'create_entry_from_db_record' ], $records );
+ }
+
+ /**
+ * Initialize the data store.
+ *
+ * @codeCoverageIgnore
+ */
+ public function init() {
+
+ $table_maker = new ActionScheduler_LoggerSchema();
+ $table_maker->register_tables();
+
+ parent::init();
+
+ add_action( 'action_scheduler_deleted_action', [ $this, 'clear_deleted_action_logs' ], 10, 1 );
+ }
+
+ /**
+ * Delete the action logs for an action.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function clear_deleted_action_logs( $action_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $wpdb->delete( $wpdb->actionscheduler_logs, [ 'action_id' => $action_id, ], [ '%d' ] );
+ }
+
+ /**
+ * Bulk add cancel action log entries.
+ *
+ * @param array $action_ids List of action ID.
+ */
+ public function bulk_log_cancel_actions( $action_ids ) {
+ if ( empty( $action_ids ) ) {
+ return;
+ }
+
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $date = as_get_datetime_object();
+ $date_gmt = $date->format( 'Y-m-d H:i:s' );
+ ActionScheduler_TimezoneHelper::set_local_timezone( $date );
+ $date_local = $date->format( 'Y-m-d H:i:s' );
+ $message = __( 'action canceled', 'action-scheduler' );
+ $format = '(%d, ' . $wpdb->prepare( '%s, %s, %s', $message, $date_gmt, $date_local ) . ')';
+ $sql_query = "INSERT {$wpdb->actionscheduler_logs} (action_id, message, log_date_gmt, log_date_local) VALUES ";
+ $value_rows = [];
+
+ foreach ( $action_ids as $action_id ) {
+ $value_rows[] = $wpdb->prepare( $format, $action_id );
+ }
+ $sql_query .= implode( ',', $value_rows );
+
+ $wpdb->query( $sql_query );
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
new file mode 100644
index 00000000..d70e4cec
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php
@@ -0,0 +1,845 @@
+register_tables();
+ }
+
+ /**
+ * Save an action.
+ *
+ * @param ActionScheduler_Action $action Action object.
+ * @param DateTime $date Optional schedule date. Default null.
+ *
+ * @return int Action ID.
+ */
+ public function save_action( ActionScheduler_Action $action, \DateTime $date = null ) {
+ try {
+
+ $this->validate_action( $action );
+
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $data = [
+ 'hook' => $action->get_hook(),
+ 'status' => ( $action->is_finished() ? self::STATUS_COMPLETE : self::STATUS_PENDING ),
+ 'scheduled_date_gmt' => $this->get_scheduled_date_string( $action, $date ),
+ 'scheduled_date_local' => $this->get_scheduled_date_string_local( $action, $date ),
+ 'schedule' => serialize( $action->get_schedule() ),
+ 'group_id' => $this->get_group_id( $action->get_group() ),
+ ];
+ $args = wp_json_encode( $action->get_args() );
+ if ( strlen( $args ) <= static::$max_index_length ) {
+ $data['args'] = $args;
+ } else {
+ $data['args'] = $this->hash_args( $args );
+ $data['extended_args'] = $args;
+ }
+
+ $table_name = ! empty( $wpdb->actionscheduler_actions ) ? $wpdb->actionscheduler_actions : $wpdb->prefix . 'actionscheduler_actions';
+ $wpdb->insert( $table_name, $data );
+ $action_id = $wpdb->insert_id;
+
+ if ( is_wp_error( $action_id ) ) {
+ throw new RuntimeException( $action_id->get_error_message() );
+ }
+ elseif ( empty( $action_id ) ) {
+ throw new RuntimeException( $wpdb->last_error ? $wpdb->last_error : __( 'Database error.', 'action-scheduler' ) );
+ }
+
+ do_action( 'action_scheduler_stored_action', $action_id );
+
+ return $action_id;
+ } catch ( \Exception $e ) {
+ /* translators: %s: error message */
+ throw new \RuntimeException( sprintf( __( 'Error saving action: %s', 'action-scheduler' ), $e->getMessage() ), 0 );
+ }
+ }
+
+ /**
+ * Generate a hash from json_encoded $args using MD5 as this isn't for security.
+ *
+ * @param string $args JSON encoded action args.
+ * @return string
+ */
+ protected function hash_args( $args ) {
+ return md5( $args );
+ }
+
+ /**
+ * Get action args query param value from action args.
+ *
+ * @param array $args Action args.
+ * @return string
+ */
+ protected function get_args_for_query( $args ) {
+ $encoded = wp_json_encode( $args );
+ if ( strlen( $encoded ) <= static::$max_index_length ) {
+ return $encoded;
+ }
+ return $this->hash_args( $encoded );
+ }
+ /**
+ * Get a group's ID based on its name/slug.
+ *
+ * @param string $slug The string name of a group.
+ * @param bool $create_if_not_exists Whether to create the group if it does not already exist. Default, true - create the group.
+ *
+ * @return int The group's ID, if it exists or is created, or 0 if it does not exist and is not created.
+ */
+ protected function get_group_id( $slug, $create_if_not_exists = true ) {
+ if ( empty( $slug ) ) {
+ return 0;
+ }
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $group_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT group_id FROM {$wpdb->actionscheduler_groups} WHERE slug=%s", $slug ) );
+ if ( empty( $group_id ) && $create_if_not_exists ) {
+ $group_id = $this->create_group( $slug );
+ }
+
+ return $group_id;
+ }
+
+ /**
+ * Create an action group.
+ *
+ * @param string $slug Group slug.
+ *
+ * @return int Group ID.
+ */
+ protected function create_group( $slug ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $wpdb->insert( $wpdb->actionscheduler_groups, [ 'slug' => $slug ] );
+
+ return (int) $wpdb->insert_id;
+ }
+
+ /**
+ * Retrieve an action.
+ *
+ * @param int $action_id Action ID.
+ *
+ * @return ActionScheduler_Action
+ */
+ public function fetch_action( $action_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $data = $wpdb->get_row( $wpdb->prepare(
+ "SELECT a.*, g.slug AS `group` FROM {$wpdb->actionscheduler_actions} a LEFT JOIN {$wpdb->actionscheduler_groups} g ON a.group_id=g.group_id WHERE a.action_id=%d",
+ $action_id
+ ) );
+
+ if ( empty( $data ) ) {
+ return $this->get_null_action();
+ }
+
+ if ( ! empty( $data->extended_args ) ) {
+ $data->args = $data->extended_args;
+ unset( $data->extended_args );
+ }
+
+ try {
+ $action = $this->make_action_from_db_record( $data );
+ } catch ( ActionScheduler_InvalidActionException $exception ) {
+ do_action( 'action_scheduler_failed_fetch_action', $action_id, $exception );
+ return $this->get_null_action();
+ }
+
+ return $action;
+ }
+
+ /**
+ * Create a null action.
+ *
+ * @return ActionScheduler_NullAction
+ */
+ protected function get_null_action() {
+ return new ActionScheduler_NullAction();
+ }
+
+ /**
+ * Create an action from a database record.
+ *
+ * @param object $data Action database record.
+ *
+ * @return ActionScheduler_Action|ActionScheduler_CanceledAction|ActionScheduler_FinishedAction
+ */
+ protected function make_action_from_db_record( $data ) {
+
+ $hook = $data->hook;
+ $args = json_decode( $data->args, true );
+ $schedule = unserialize( $data->schedule );
+
+ $this->validate_args( $args, $data->action_id );
+ $this->validate_schedule( $schedule, $data->action_id );
+
+ if ( empty( $schedule ) ) {
+ $schedule = new ActionScheduler_NullSchedule();
+ }
+ $group = $data->group ? $data->group : '';
+
+ return ActionScheduler::factory()->get_stored_action( $data->status, $data->hook, $args, $schedule, $group );
+ }
+
+ /**
+ * Find an action.
+ *
+ * @param string $hook Action hook.
+ * @param array $params Parameters of the action to find.
+ *
+ * @return string|null ID of the next action matching the criteria or NULL if not found.
+ */
+ public function find_action( $hook, $params = [] ) {
+ $params = wp_parse_args( $params, [
+ 'args' => null,
+ 'status' => self::STATUS_PENDING,
+ 'group' => '',
+ ] );
+
+ /** @var wpdb $wpdb */
+ global $wpdb;
+ $query = "SELECT a.action_id FROM {$wpdb->actionscheduler_actions} a";
+ $args = [];
+ if ( ! empty( $params[ 'group' ] ) ) {
+ $query .= " INNER JOIN {$wpdb->actionscheduler_groups} g ON g.group_id=a.group_id AND g.slug=%s";
+ $args[] = $params[ 'group' ];
+ }
+ $query .= " WHERE a.hook=%s";
+ $args[] = $hook;
+ if ( ! is_null( $params[ 'args' ] ) ) {
+ $query .= " AND a.args=%s";
+ $args[] = $this->get_args_for_query( $params[ 'args' ] );
+ }
+
+ $order = 'ASC';
+ if ( ! empty( $params[ 'status' ] ) ) {
+ $query .= " AND a.status=%s";
+ $args[] = $params[ 'status' ];
+
+ if ( self::STATUS_PENDING == $params[ 'status' ] ) {
+ $order = 'ASC'; // Find the next action that matches.
+ } else {
+ $order = 'DESC'; // Find the most recent action that matches.
+ }
+ }
+
+ $query .= " ORDER BY scheduled_date_gmt $order LIMIT 1";
+
+ $query = $wpdb->prepare( $query, $args );
+
+ $id = $wpdb->get_var( $query );
+
+ return $id;
+ }
+
+ /**
+ * Returns the SQL statement to query (or count) actions.
+ *
+ * @param array $query Filtering options.
+ * @param string $select_or_count Whether the SQL should select and return the IDs or just the row count.
+ *
+ * @return string SQL statement already properly escaped.
+ */
+ protected function get_query_actions_sql( array $query, $select_or_count = 'select' ) {
+
+ if ( ! in_array( $select_or_count, array( 'select', 'count' ) ) ) {
+ throw new InvalidArgumentException( __( 'Invalid value for select or count parameter. Cannot query actions.', 'action-scheduler' ) );
+ }
+
+ $query = wp_parse_args( $query, [
+ 'hook' => '',
+ 'args' => null,
+ 'date' => null,
+ 'date_compare' => '<=',
+ 'modified' => null,
+ 'modified_compare' => '<=',
+ 'group' => '',
+ 'status' => '',
+ 'claimed' => null,
+ 'per_page' => 5,
+ 'offset' => 0,
+ 'orderby' => 'date',
+ 'order' => 'ASC',
+ ] );
+
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $sql = ( 'count' === $select_or_count ) ? 'SELECT count(a.action_id)' : 'SELECT a.action_id';
+ $sql .= " FROM {$wpdb->actionscheduler_actions} a";
+ $sql_params = [];
+
+ if ( ! empty( $query[ 'group' ] ) || 'group' === $query[ 'orderby' ] ) {
+ $sql .= " LEFT JOIN {$wpdb->actionscheduler_groups} g ON g.group_id=a.group_id";
+ }
+
+ $sql .= " WHERE 1=1";
+
+ if ( ! empty( $query[ 'group' ] ) ) {
+ $sql .= " AND g.slug=%s";
+ $sql_params[] = $query[ 'group' ];
+ }
+
+ if ( $query[ 'hook' ] ) {
+ $sql .= " AND a.hook=%s";
+ $sql_params[] = $query[ 'hook' ];
+ }
+ if ( ! is_null( $query[ 'args' ] ) ) {
+ $sql .= " AND a.args=%s";
+ $sql_params[] = $this->get_args_for_query( $query[ 'args' ] );
+ }
+
+ if ( $query[ 'status' ] ) {
+ $sql .= " AND a.status=%s";
+ $sql_params[] = $query[ 'status' ];
+ }
+
+ if ( $query[ 'date' ] instanceof \DateTime ) {
+ $date = clone $query[ 'date' ];
+ $date->setTimezone( new \DateTimeZone( 'UTC' ) );
+ $date_string = $date->format( 'Y-m-d H:i:s' );
+ $comparator = $this->validate_sql_comparator( $query[ 'date_compare' ] );
+ $sql .= " AND a.scheduled_date_gmt $comparator %s";
+ $sql_params[] = $date_string;
+ }
+
+ if ( $query[ 'modified' ] instanceof \DateTime ) {
+ $modified = clone $query[ 'modified' ];
+ $modified->setTimezone( new \DateTimeZone( 'UTC' ) );
+ $date_string = $modified->format( 'Y-m-d H:i:s' );
+ $comparator = $this->validate_sql_comparator( $query[ 'modified_compare' ] );
+ $sql .= " AND a.last_attempt_gmt $comparator %s";
+ $sql_params[] = $date_string;
+ }
+
+ if ( $query[ 'claimed' ] === true ) {
+ $sql .= " AND a.claim_id != 0";
+ } elseif ( $query[ 'claimed' ] === false ) {
+ $sql .= " AND a.claim_id = 0";
+ } elseif ( ! is_null( $query[ 'claimed' ] ) ) {
+ $sql .= " AND a.claim_id = %d";
+ $sql_params[] = $query[ 'claimed' ];
+ }
+
+ if ( ! empty( $query['search'] ) ) {
+ $sql .= " AND (a.hook LIKE %s OR (a.extended_args IS NULL AND a.args LIKE %s) OR a.extended_args LIKE %s";
+ for( $i = 0; $i < 3; $i++ ) {
+ $sql_params[] = sprintf( '%%%s%%', $query['search'] );
+ }
+
+ $search_claim_id = (int) $query['search'];
+ if ( $search_claim_id ) {
+ $sql .= ' OR a.claim_id = %d';
+ $sql_params[] = $search_claim_id;
+ }
+
+ $sql .= ')';
+ }
+
+ if ( 'select' === $select_or_count ) {
+ switch ( $query['orderby'] ) {
+ case 'hook':
+ $orderby = 'a.hook';
+ break;
+ case 'group':
+ $orderby = 'g.slug';
+ break;
+ case 'modified':
+ $orderby = 'a.last_attempt_gmt';
+ break;
+ case 'date':
+ default:
+ $orderby = 'a.scheduled_date_gmt';
+ break;
+ }
+ if ( strtoupper( $query[ 'order' ] ) == 'ASC' ) {
+ $order = 'ASC';
+ } else {
+ $order = 'DESC';
+ }
+ $sql .= " ORDER BY $orderby $order";
+ if ( $query[ 'per_page' ] > 0 ) {
+ $sql .= " LIMIT %d, %d";
+ $sql_params[] = $query[ 'offset' ];
+ $sql_params[] = $query[ 'per_page' ];
+ }
+ }
+
+ if ( ! empty( $sql_params ) ) {
+ $sql = $wpdb->prepare( $sql, $sql_params );
+ }
+
+ return $sql;
+ }
+
+ /**
+ * Query for action count of list of action IDs.
+ *
+ * @param array $query Query parameters.
+ * @param string $query_type Whether to select or count the results. Default, select.
+ *
+ * @return null|string|array The IDs of actions matching the query
+ */
+ public function query_actions( $query = [], $query_type = 'select' ) {
+ /** @var wpdb $wpdb */
+ global $wpdb;
+
+ $sql = $this->get_query_actions_sql( $query, $query_type );
+
+ return ( 'count' === $query_type ) ? $wpdb->get_var( $sql ) : $wpdb->get_col( $sql );
+ }
+
+ /**
+ * Get a count of all actions in the store, grouped by status.
+ *
+ * @return array Set of 'status' => int $count pairs for statuses with 1 or more actions of that status.
+ */
+ public function action_counts() {
+ global $wpdb;
+
+ $sql = "SELECT a.status, count(a.status) as 'count'";
+ $sql .= " FROM {$wpdb->actionscheduler_actions} a";
+ $sql .= " GROUP BY a.status";
+
+ $actions_count_by_status = array();
+ $action_stati_and_labels = $this->get_status_labels();
+
+ foreach ( $wpdb->get_results( $sql ) as $action_data ) {
+ // Ignore any actions with invalid status
+ if ( array_key_exists( $action_data->status, $action_stati_and_labels ) ) {
+ $actions_count_by_status[ $action_data->status ] = $action_data->count;
+ }
+ }
+
+ return $actions_count_by_status;
+ }
+
+ /**
+ * Cancel an action.
+ *
+ * @param int $action_id Action ID.
+ *
+ * @return void
+ */
+ public function cancel_action( $action_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+
+ $updated = $wpdb->update(
+ $wpdb->actionscheduler_actions,
+ [ 'status' => self::STATUS_CANCELED ],
+ [ 'action_id' => $action_id ],
+ [ '%s' ],
+ [ '%d' ]
+ );
+ if ( empty( $updated ) ) {
+ /* translators: %s: action ID */
+ throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) );
+ }
+ do_action( 'action_scheduler_canceled_action', $action_id );
+ }
+
+ /**
+ * Cancel pending actions by hook.
+ *
+ * @since 3.0.0
+ *
+ * @param string $hook Hook name.
+ *
+ * @return void
+ */
+ public function cancel_actions_by_hook( $hook ) {
+ $this->bulk_cancel_actions( [ 'hook' => $hook ] );
+ }
+
+ /**
+ * Cancel pending actions by group.
+ *
+ * @param string $group Group slug.
+ *
+ * @return void
+ */
+ public function cancel_actions_by_group( $group ) {
+ $this->bulk_cancel_actions( [ 'group' => $group ] );
+ }
+
+ /**
+ * Bulk cancel actions.
+ *
+ * @since 3.0.0
+ *
+ * @param array $query_args Query parameters.
+ */
+ protected function bulk_cancel_actions( $query_args ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+
+ if ( ! is_array( $query_args ) ) {
+ return;
+ }
+
+ // Don't cancel actions that are already canceled.
+ if ( isset( $query_args['status'] ) && $query_args['status'] == self::STATUS_CANCELED ) {
+ return;
+ }
+
+ $action_ids = true;
+ $query_args = wp_parse_args(
+ $query_args,
+ [
+ 'per_page' => 1000,
+ 'status' => self::STATUS_PENDING,
+ ]
+ );
+
+ while ( $action_ids ) {
+ $action_ids = $this->query_actions( $query_args );
+ if ( empty( $action_ids ) ) {
+ break;
+ }
+
+ $format = array_fill( 0, count( $action_ids ), '%d' );
+ $query_in = '(' . implode( ',', $format ) . ')';
+ $parameters = $action_ids;
+ array_unshift( $parameters, self::STATUS_CANCELED );
+
+ $wpdb->query(
+ $wpdb->prepare( // wpcs: PreparedSQLPlaceholders replacement count ok.
+ "UPDATE {$wpdb->actionscheduler_actions} SET status = %s WHERE action_id IN {$query_in}",
+ $parameters
+ )
+ );
+
+ do_action( 'action_scheduler_bulk_cancel_actions', $action_ids );
+ }
+ }
+
+ /**
+ * Delete an action.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function delete_action( $action_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $deleted = $wpdb->delete( $wpdb->actionscheduler_actions, [ 'action_id' => $action_id ], [ '%d' ] );
+ if ( empty( $deleted ) ) {
+ throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) );
+ }
+ do_action( 'action_scheduler_deleted_action', $action_id );
+ }
+
+ /**
+ * Get the schedule date for an action.
+ *
+ * @param string $action_id Action ID.
+ *
+ * @throws \InvalidArgumentException
+ * @return \DateTime The local date the action is scheduled to run, or the date that it ran.
+ */
+ public function get_date( $action_id ) {
+ $date = $this->get_date_gmt( $action_id );
+ ActionScheduler_TimezoneHelper::set_local_timezone( $date );
+ return $date;
+ }
+
+ /**
+ * Get the GMT schedule date for an action.
+ *
+ * @param int $action_id Action ID.
+ *
+ * @throws \InvalidArgumentException
+ * @return \DateTime The GMT date the action is scheduled to run, or the date that it ran.
+ */
+ protected function get_date_gmt( $action_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $record = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d", $action_id ) );
+ if ( empty( $record ) ) {
+ throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) );
+ }
+ if ( $record->status == self::STATUS_PENDING ) {
+ return as_get_datetime_object( $record->scheduled_date_gmt );
+ } else {
+ return as_get_datetime_object( $record->last_attempt_gmt );
+ }
+ }
+
+ /**
+ * Stake a claim on actions.
+ *
+ * @param int $max_actions Maximum number of action to include in claim.
+ * @param \DateTime $before_date Jobs must be schedule before this date. Defaults to now.
+ *
+ * @return ActionScheduler_ActionClaim
+ */
+ public function stake_claim( $max_actions = 10, \DateTime $before_date = null, $hooks = array(), $group = '' ) {
+ $claim_id = $this->generate_claim_id();
+ $this->claim_actions( $claim_id, $max_actions, $before_date, $hooks, $group );
+ $action_ids = $this->find_actions_by_claim_id( $claim_id );
+
+ return new ActionScheduler_ActionClaim( $claim_id, $action_ids );
+ }
+
+ /**
+ * Generate a new action claim.
+ *
+ * @return int Claim ID.
+ */
+ protected function generate_claim_id() {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $now = as_get_datetime_object();
+ $wpdb->insert( $wpdb->actionscheduler_claims, [ 'date_created_gmt' => $now->format( 'Y-m-d H:i:s' ) ] );
+
+ return $wpdb->insert_id;
+ }
+
+ /**
+ * Mark actions claimed.
+ *
+ * @param string $claim_id Claim Id.
+ * @param int $limit Number of action to include in claim.
+ * @param \DateTime $before_date Should use UTC timezone.
+ *
+ * @return int The number of actions that were claimed.
+ * @throws \RuntimeException
+ */
+ protected function claim_actions( $claim_id, $limit, \DateTime $before_date = null, $hooks = array(), $group = '' ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+
+ $now = as_get_datetime_object();
+ $date = is_null( $before_date ) ? $now : clone $before_date;
+
+ // can't use $wpdb->update() because of the <= condition
+ $update = "UPDATE {$wpdb->actionscheduler_actions} SET claim_id=%d, last_attempt_gmt=%s, last_attempt_local=%s";
+ $params = array(
+ $claim_id,
+ $now->format( 'Y-m-d H:i:s' ),
+ current_time( 'mysql' ),
+ );
+
+ $where = "WHERE claim_id = 0 AND scheduled_date_gmt <= %s AND status=%s";
+ $params[] = $date->format( 'Y-m-d H:i:s' );
+ $params[] = self::STATUS_PENDING;
+
+ if ( ! empty( $hooks ) ) {
+ $placeholders = array_fill( 0, count( $hooks ), '%s' );
+ $where .= ' AND hook IN (' . join( ', ', $placeholders ) . ')';
+ $params = array_merge( $params, array_values( $hooks ) );
+ }
+
+ if ( ! empty( $group ) ) {
+
+ $group_id = $this->get_group_id( $group, false );
+
+ // throw exception if no matching group found, this matches ActionScheduler_wpPostStore's behaviour
+ if ( empty( $group_id ) ) {
+ /* translators: %s: group name */
+ throw new InvalidArgumentException( sprintf( __( 'The group "%s" does not exist.', 'action-scheduler' ), $group ) );
+ }
+
+ $where .= ' AND group_id = %d';
+ $params[] = $group_id;
+ }
+
+ $order = "ORDER BY attempts ASC, scheduled_date_gmt ASC, action_id ASC LIMIT %d";
+ $params[] = $limit;
+
+ $sql = $wpdb->prepare( "{$update} {$where} {$order}", $params );
+
+ $rows_affected = $wpdb->query( $sql );
+ if ( $rows_affected === false ) {
+ throw new \RuntimeException( __( 'Unable to claim actions. Database error.', 'action-scheduler' ) );
+ }
+
+ return (int) $rows_affected;
+ }
+
+ /**
+ * Get the number of active claims.
+ *
+ * @return int
+ */
+ public function get_claim_count() {
+ global $wpdb;
+
+ $sql = "SELECT COUNT(DISTINCT claim_id) FROM {$wpdb->actionscheduler_actions} WHERE claim_id != 0 AND status IN ( %s, %s)";
+ $sql = $wpdb->prepare( $sql, [ self::STATUS_PENDING, self::STATUS_RUNNING ] );
+
+ return (int) $wpdb->get_var( $sql );
+ }
+
+ /**
+ * Return an action's claim ID, as stored in the claim_id column.
+ *
+ * @param string $action_id Action ID.
+ * @return mixed
+ */
+ public function get_claim_id( $action_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+
+ $sql = "SELECT claim_id FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d";
+ $sql = $wpdb->prepare( $sql, $action_id );
+
+ return (int) $wpdb->get_var( $sql );
+ }
+
+ /**
+ * Retrieve the action IDs of action in a claim.
+ *
+ * @param string $claim_id Claim ID.
+ *
+ * @return int[]
+ */
+ public function find_actions_by_claim_id( $claim_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+
+ $sql = "SELECT action_id FROM {$wpdb->actionscheduler_actions} WHERE claim_id=%d";
+ $sql = $wpdb->prepare( $sql, $claim_id );
+
+ $action_ids = $wpdb->get_col( $sql );
+
+ return array_map( 'intval', $action_ids );
+ }
+
+ /**
+ * Release actions from a claim and delete the claim.
+ *
+ * @param ActionScheduler_ActionClaim $claim Claim object.
+ */
+ public function release_claim( ActionScheduler_ActionClaim $claim ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $wpdb->update( $wpdb->actionscheduler_actions, [ 'claim_id' => 0 ], [ 'claim_id' => $claim->get_id() ], [ '%d' ], [ '%d' ] );
+ $wpdb->delete( $wpdb->actionscheduler_claims, [ 'claim_id' => $claim->get_id() ], [ '%d' ] );
+ }
+
+ /**
+ * Remove the claim from an action.
+ *
+ * @param int $action_id Action ID.
+ *
+ * @return void
+ */
+ public function unclaim_action( $action_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $wpdb->update(
+ $wpdb->actionscheduler_actions,
+ [ 'claim_id' => 0 ],
+ [ 'action_id' => $action_id ],
+ [ '%s' ],
+ [ '%d' ]
+ );
+ }
+
+ /**
+ * Mark an action as failed.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function mark_failure( $action_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $updated = $wpdb->update(
+ $wpdb->actionscheduler_actions,
+ [ 'status' => self::STATUS_FAILED ],
+ [ 'action_id' => $action_id ],
+ [ '%s' ],
+ [ '%d' ]
+ );
+ if ( empty( $updated ) ) {
+ throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) );
+ }
+ }
+
+ /**
+ * Add execution message to action log.
+ *
+ * @param int $action_id Action ID.
+ *
+ * @return void
+ */
+ public function log_execution( $action_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+
+ $sql = "UPDATE {$wpdb->actionscheduler_actions} SET attempts = attempts+1, status=%s, last_attempt_gmt = %s, last_attempt_local = %s WHERE action_id = %d";
+ $sql = $wpdb->prepare( $sql, self::STATUS_RUNNING, current_time( 'mysql', true ), current_time( 'mysql' ), $action_id );
+ $wpdb->query( $sql );
+ }
+
+ /**
+ * Mark an action as complete.
+ *
+ * @param int $action_id Action ID.
+ *
+ * @return void
+ */
+ public function mark_complete( $action_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $updated = $wpdb->update(
+ $wpdb->actionscheduler_actions,
+ [
+ 'status' => self::STATUS_COMPLETE,
+ 'last_attempt_gmt' => current_time( 'mysql', true ),
+ 'last_attempt_local' => current_time( 'mysql' ),
+ ],
+ [ 'action_id' => $action_id ],
+ [ '%s' ],
+ [ '%d' ]
+ );
+ if ( empty( $updated ) ) {
+ throw new \InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) );
+ }
+ }
+
+ /**
+ * Get an action's status.
+ *
+ * @param int $action_id Action ID.
+ *
+ * @return string
+ */
+ public function get_status( $action_id ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $sql = "SELECT status FROM {$wpdb->actionscheduler_actions} WHERE action_id=%d";
+ $sql = $wpdb->prepare( $sql, $action_id );
+ $status = $wpdb->get_var( $sql );
+
+ if ( $status === null ) {
+ throw new \InvalidArgumentException( __( 'Invalid action ID. No status found.', 'action-scheduler' ) );
+ } elseif ( empty( $status ) ) {
+ throw new \RuntimeException( __( 'Unknown status found for action.', 'action-scheduler' ) );
+ } else {
+ return $status;
+ }
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php
new file mode 100644
index 00000000..22d61a60
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php
@@ -0,0 +1,426 @@
+demarkation_id = (int) get_option( self::DEMARKATION_OPTION, 0 );
+ if ( empty( $config ) ) {
+ $config = Controller::instance()->get_migration_config_object();
+ }
+ $this->primary_store = $config->get_destination_store();
+ $this->secondary_store = $config->get_source_store();
+ $this->migration_runner = new Runner( $config );
+ }
+
+ /**
+ * Initialize the table data store tables.
+ *
+ * @codeCoverageIgnore
+ */
+ public function init() {
+ add_action( 'action_scheduler/created_table', [ $this, 'set_autoincrement' ], 10, 2 );
+ $this->primary_store->init();
+ $this->secondary_store->init();
+ remove_action( 'action_scheduler/created_table', [ $this, 'set_autoincrement' ], 10 );
+ }
+
+ /**
+ * When the actions table is created, set its autoincrement
+ * value to be one higher than the posts table to ensure that
+ * there are no ID collisions.
+ *
+ * @param string $table_name
+ * @param string $table_suffix
+ *
+ * @return void
+ * @codeCoverageIgnore
+ */
+ public function set_autoincrement( $table_name, $table_suffix ) {
+ if ( ActionScheduler_StoreSchema::ACTIONS_TABLE === $table_suffix ) {
+ if ( empty( $this->demarkation_id ) ) {
+ $this->demarkation_id = $this->set_demarkation_id();
+ }
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ /**
+ * A default date of '0000-00-00 00:00:00' is invalid in MySQL 5.7 when configured with
+ * sql_mode including both STRICT_TRANS_TABLES and NO_ZERO_DATE.
+ */
+ $default_date = new DateTime( 'tomorrow' );
+ $null_action = new ActionScheduler_NullAction();
+ $date_gmt = $this->get_scheduled_date_string( $null_action, $default_date );
+ $date_local = $this->get_scheduled_date_string_local( $null_action, $default_date );
+
+ $row_count = $wpdb->insert(
+ $wpdb->{ActionScheduler_StoreSchema::ACTIONS_TABLE},
+ [
+ 'action_id' => $this->demarkation_id,
+ 'hook' => '',
+ 'status' => '',
+ 'scheduled_date_gmt' => $date_gmt,
+ 'scheduled_date_local' => $date_local,
+ 'last_attempt_gmt' => $date_gmt,
+ 'last_attempt_local' => $date_local,
+ ]
+ );
+ if ( $row_count > 0 ) {
+ $wpdb->delete(
+ $wpdb->{ActionScheduler_StoreSchema::ACTIONS_TABLE},
+ [ 'action_id' => $this->demarkation_id ]
+ );
+ }
+ }
+ }
+
+ /**
+ * Store the demarkation id in WP options.
+ *
+ * @param int $id The ID to set as the demarkation point between the two stores
+ * Leave null to use the next ID from the WP posts table.
+ *
+ * @return int The new ID.
+ *
+ * @codeCoverageIgnore
+ */
+ private function set_demarkation_id( $id = null ) {
+ if ( empty( $id ) ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ $id = (int) $wpdb->get_var( "SELECT MAX(ID) FROM $wpdb->posts" );
+ $id ++;
+ }
+ update_option( self::DEMARKATION_OPTION, $id );
+
+ return $id;
+ }
+
+ /**
+ * Find the first matching action from the secondary store.
+ * If it exists, migrate it to the primary store immediately.
+ * After it migrates, the secondary store will logically contain
+ * the next matching action, so return the result thence.
+ *
+ * @param string $hook
+ * @param array $params
+ *
+ * @return string
+ */
+ public function find_action( $hook, $params = [] ) {
+ $found_unmigrated_action = $this->secondary_store->find_action( $hook, $params );
+ if ( ! empty( $found_unmigrated_action ) ) {
+ $this->migrate( [ $found_unmigrated_action ] );
+ }
+
+ return $this->primary_store->find_action( $hook, $params );
+ }
+
+ /**
+ * Find actions matching the query in the secondary source first.
+ * If any are found, migrate them immediately. Then the secondary
+ * store will contain the canonical results.
+ *
+ * @param array $query
+ * @param string $query_type Whether to select or count the results. Default, select.
+ *
+ * @return int[]
+ */
+ public function query_actions( $query = [], $query_type = 'select' ) {
+ $found_unmigrated_actions = $this->secondary_store->query_actions( $query, 'select' );
+ if ( ! empty( $found_unmigrated_actions ) ) {
+ $this->migrate( $found_unmigrated_actions );
+ }
+
+ return $this->primary_store->query_actions( $query, $query_type );
+ }
+
+ /**
+ * Get a count of all actions in the store, grouped by status
+ *
+ * @return array Set of 'status' => int $count pairs for statuses with 1 or more actions of that status.
+ */
+ public function action_counts() {
+ $unmigrated_actions_count = $this->secondary_store->action_counts();
+ $migrated_actions_count = $this->primary_store->action_counts();
+ $actions_count_by_status = array();
+
+ foreach ( $this->get_status_labels() as $status_key => $status_label ) {
+
+ $count = 0;
+
+ if ( isset( $unmigrated_actions_count[ $status_key ] ) ) {
+ $count += $unmigrated_actions_count[ $status_key ];
+ }
+
+ if ( isset( $migrated_actions_count[ $status_key ] ) ) {
+ $count += $migrated_actions_count[ $status_key ];
+ }
+
+ $actions_count_by_status[ $status_key ] = $count;
+ }
+
+ $actions_count_by_status = array_filter( $actions_count_by_status );
+
+ return $actions_count_by_status;
+ }
+
+ /**
+ * If any actions would have been claimed by the secondary store,
+ * migrate them immediately, then ask the primary store for the
+ * canonical claim.
+ *
+ * @param int $max_actions
+ * @param DateTime|null $before_date
+ *
+ * @return ActionScheduler_ActionClaim
+ */
+ public function stake_claim( $max_actions = 10, DateTime $before_date = null, $hooks = array(), $group = '' ) {
+ $claim = $this->secondary_store->stake_claim( $max_actions, $before_date, $hooks, $group );
+
+ $claimed_actions = $claim->get_actions();
+ if ( ! empty( $claimed_actions ) ) {
+ $this->migrate( $claimed_actions );
+ }
+
+ $this->secondary_store->release_claim( $claim );
+
+ return $this->primary_store->stake_claim( $max_actions, $before_date, $hooks, $group );
+ }
+
+ /**
+ * Migrate a list of actions to the table data store.
+ *
+ * @param array $action_ids List of action IDs.
+ */
+ private function migrate( $action_ids ) {
+ $this->migration_runner->migrate_actions( $action_ids );
+ }
+
+ /**
+ * Save an action to the primary store.
+ *
+ * @param ActionScheduler_Action $action Action object to be saved.
+ * @param DateTime $date Optional. Schedule date. Default null.
+ *
+ * @return int The action ID
+ */
+ public function save_action( ActionScheduler_Action $action, DateTime $date = null ) {
+ return $this->primary_store->save_action( $action, $date );
+ }
+
+ /**
+ * Retrieve an existing action whether migrated or not.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function fetch_action( $action_id ) {
+ $store = $this->get_store_from_action_id( $action_id, true );
+ if ( $store ) {
+ return $store->fetch_action( $action_id );
+ } else {
+ return new ActionScheduler_NullAction();
+ }
+ }
+
+ /**
+ * Cancel an existing action whether migrated or not.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function cancel_action( $action_id ) {
+ $store = $this->get_store_from_action_id( $action_id );
+ if ( $store ) {
+ $store->cancel_action( $action_id );
+ }
+ }
+
+ /**
+ * Delete an existing action whether migrated or not.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function delete_action( $action_id ) {
+ $store = $this->get_store_from_action_id( $action_id );
+ if ( $store ) {
+ $store->delete_action( $action_id );
+ }
+ }
+
+ /**
+ * Get the schedule date an existing action whether migrated or not.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function get_date( $action_id ) {
+ $store = $this->get_store_from_action_id( $action_id );
+ if ( $store ) {
+ return $store->get_date( $action_id );
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Mark an existing action as failed whether migrated or not.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function mark_failure( $action_id ) {
+ $store = $this->get_store_from_action_id( $action_id );
+ if ( $store ) {
+ $store->mark_failure( $action_id );
+ }
+ }
+
+ /**
+ * Log the execution of an existing action whether migrated or not.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function log_execution( $action_id ) {
+ $store = $this->get_store_from_action_id( $action_id );
+ if ( $store ) {
+ $store->log_execution( $action_id );
+ }
+ }
+
+ /**
+ * Mark an existing action complete whether migrated or not.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function mark_complete( $action_id ) {
+ $store = $this->get_store_from_action_id( $action_id );
+ if ( $store ) {
+ $store->mark_complete( $action_id );
+ }
+ }
+
+ /**
+ * Get an existing action status whether migrated or not.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function get_status( $action_id ) {
+ $store = $this->get_store_from_action_id( $action_id );
+ if ( $store ) {
+ return $store->get_status( $action_id );
+ }
+ return null;
+ }
+
+ /**
+ * Return which store an action is stored in.
+ *
+ * @param int $action_id ID of the action.
+ * @param bool $primary_first Optional flag indicating search the primary store first.
+ * @return ActionScheduler_Store
+ */
+ protected function get_store_from_action_id( $action_id, $primary_first = false ) {
+ if ( $primary_first ) {
+ $stores = [
+ $this->primary_store,
+ $this->secondary_store,
+ ];
+ } elseif ( $action_id < $this->demarkation_id ) {
+ $stores = [
+ $this->secondary_store,
+ $this->primary_store,
+ ];
+ } else {
+ $stores = [
+ $this->primary_store,
+ ];
+ }
+
+ foreach ( $stores as $store ) {
+ $action = $store->fetch_action( $action_id );
+ if ( ! is_a( $action, 'ActionScheduler_NullAction' ) ) {
+ return $store;
+ }
+ }
+ return null;
+ }
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * All claim-related functions should operate solely
+ * on the primary store.
+ * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+ /**
+ * Get the claim count from the table data store.
+ */
+ public function get_claim_count() {
+ return $this->primary_store->get_claim_count();
+ }
+
+ /**
+ * Retrieve the claim ID for an action from the table data store.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function get_claim_id( $action_id ) {
+ return $this->primary_store->get_claim_id( $action_id );
+ }
+
+ /**
+ * Release a claim in the table data store.
+ *
+ * @param ActionScheduler_ActionClaim $claim Claim object.
+ */
+ public function release_claim( ActionScheduler_ActionClaim $claim ) {
+ $this->primary_store->release_claim( $claim );
+ }
+
+ /**
+ * Release claims on an action in the table data store.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function unclaim_action( $action_id ) {
+ $this->primary_store->unclaim_action( $action_id );
+ }
+
+ /**
+ * Retrieve a list of action IDs by claim.
+ *
+ * @param int $claim_id Claim ID.
+ */
+ public function find_actions_by_claim_id( $claim_id ) {
+ return $this->primary_store->find_actions_by_claim_id( $claim_id );
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php
new file mode 100644
index 00000000..7215ddd9
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php
@@ -0,0 +1,240 @@
+create_wp_comment( $action_id, $message, $date );
+ return $comment_id;
+ }
+
+ protected function create_wp_comment( $action_id, $message, DateTime $date ) {
+
+ $comment_date_gmt = $date->format('Y-m-d H:i:s');
+ ActionScheduler_TimezoneHelper::set_local_timezone( $date );
+ $comment_data = array(
+ 'comment_post_ID' => $action_id,
+ 'comment_date' => $date->format('Y-m-d H:i:s'),
+ 'comment_date_gmt' => $comment_date_gmt,
+ 'comment_author' => self::AGENT,
+ 'comment_content' => $message,
+ 'comment_agent' => self::AGENT,
+ 'comment_type' => self::TYPE,
+ );
+ return wp_insert_comment($comment_data);
+ }
+
+ /**
+ * @param string $entry_id
+ *
+ * @return ActionScheduler_LogEntry
+ */
+ public function get_entry( $entry_id ) {
+ $comment = $this->get_comment( $entry_id );
+ if ( empty($comment) || $comment->comment_type != self::TYPE ) {
+ return new ActionScheduler_NullLogEntry();
+ }
+
+ $date = as_get_datetime_object( $comment->comment_date_gmt );
+ ActionScheduler_TimezoneHelper::set_local_timezone( $date );
+ return new ActionScheduler_LogEntry( $comment->comment_post_ID, $comment->comment_content, $date );
+ }
+
+ /**
+ * @param string $action_id
+ *
+ * @return ActionScheduler_LogEntry[]
+ */
+ public function get_logs( $action_id ) {
+ $status = 'all';
+ if ( get_post_status($action_id) == 'trash' ) {
+ $status = 'post-trashed';
+ }
+ $comments = get_comments(array(
+ 'post_id' => $action_id,
+ 'orderby' => 'comment_date_gmt',
+ 'order' => 'ASC',
+ 'type' => self::TYPE,
+ 'status' => $status,
+ ));
+ $logs = array();
+ foreach ( $comments as $c ) {
+ $entry = $this->get_entry( $c );
+ if ( !empty($entry) ) {
+ $logs[] = $entry;
+ }
+ }
+ return $logs;
+ }
+
+ protected function get_comment( $comment_id ) {
+ return get_comment( $comment_id );
+ }
+
+
+
+ /**
+ * @param WP_Comment_Query $query
+ */
+ public function filter_comment_queries( $query ) {
+ foreach ( array('ID', 'parent', 'post_author', 'post_name', 'post_parent', 'type', 'post_type', 'post_id', 'post_ID') as $key ) {
+ if ( !empty($query->query_vars[$key]) ) {
+ return; // don't slow down queries that wouldn't include action_log comments anyway
+ }
+ }
+ $query->query_vars['action_log_filter'] = TRUE;
+ add_filter( 'comments_clauses', array( $this, 'filter_comment_query_clauses' ), 10, 2 );
+ }
+
+ /**
+ * @param array $clauses
+ * @param WP_Comment_Query $query
+ *
+ * @return array
+ */
+ public function filter_comment_query_clauses( $clauses, $query ) {
+ if ( !empty($query->query_vars['action_log_filter']) ) {
+ $clauses['where'] .= $this->get_where_clause();
+ }
+ return $clauses;
+ }
+
+ /**
+ * Make sure Action Scheduler logs are excluded from comment feeds, which use WP_Query, not
+ * the WP_Comment_Query class handled by @see self::filter_comment_queries().
+ *
+ * @param string $where
+ * @param WP_Query $query
+ *
+ * @return string
+ */
+ public function filter_comment_feed( $where, $query ) {
+ if ( is_comment_feed() ) {
+ $where .= $this->get_where_clause();
+ }
+ return $where;
+ }
+
+ /**
+ * Return a SQL clause to exclude Action Scheduler comments.
+ *
+ * @return string
+ */
+ protected function get_where_clause() {
+ global $wpdb;
+ return sprintf( " AND {$wpdb->comments}.comment_type != '%s'", self::TYPE );
+ }
+
+ /**
+ * Remove action log entries from wp_count_comments()
+ *
+ * @param array $stats
+ * @param int $post_id
+ *
+ * @return object
+ */
+ public function filter_comment_count( $stats, $post_id ) {
+ global $wpdb;
+
+ if ( 0 === $post_id ) {
+ $stats = $this->get_comment_count();
+ }
+
+ return $stats;
+ }
+
+ /**
+ * Retrieve the comment counts from our cache, or the database if the cached version isn't set.
+ *
+ * @return object
+ */
+ protected function get_comment_count() {
+ global $wpdb;
+
+ $stats = get_transient( 'as_comment_count' );
+
+ if ( ! $stats ) {
+ $stats = array();
+
+ $count = $wpdb->get_results( "SELECT comment_approved, COUNT( * ) AS num_comments FROM {$wpdb->comments} WHERE comment_type NOT IN('order_note','action_log') GROUP BY comment_approved", ARRAY_A );
+
+ $total = 0;
+ $stats = array();
+ $approved = array( '0' => 'moderated', '1' => 'approved', 'spam' => 'spam', 'trash' => 'trash', 'post-trashed' => 'post-trashed' );
+
+ foreach ( (array) $count as $row ) {
+ // Don't count post-trashed toward totals
+ if ( 'post-trashed' != $row['comment_approved'] && 'trash' != $row['comment_approved'] ) {
+ $total += $row['num_comments'];
+ }
+ if ( isset( $approved[ $row['comment_approved'] ] ) ) {
+ $stats[ $approved[ $row['comment_approved'] ] ] = $row['num_comments'];
+ }
+ }
+
+ $stats['total_comments'] = $total;
+ $stats['all'] = $total;
+
+ foreach ( $approved as $key ) {
+ if ( empty( $stats[ $key ] ) ) {
+ $stats[ $key ] = 0;
+ }
+ }
+
+ $stats = (object) $stats;
+ set_transient( 'as_comment_count', $stats );
+ }
+
+ return $stats;
+ }
+
+ /**
+ * Delete comment count cache whenever there is new comment or the status of a comment changes. Cache
+ * will be regenerated next time ActionScheduler_wpCommentLogger::filter_comment_count() is called.
+ */
+ public function delete_comment_count_cache() {
+ delete_transient( 'as_comment_count' );
+ }
+
+ /**
+ * @codeCoverageIgnore
+ */
+ public function init() {
+ add_action( 'action_scheduler_before_process_queue', array( $this, 'disable_comment_counting' ), 10, 0 );
+ add_action( 'action_scheduler_after_process_queue', array( $this, 'enable_comment_counting' ), 10, 0 );
+
+ parent::init();
+
+ add_action( 'pre_get_comments', array( $this, 'filter_comment_queries' ), 10, 1 );
+ add_action( 'wp_count_comments', array( $this, 'filter_comment_count' ), 20, 2 ); // run after WC_Comments::wp_count_comments() to make sure we exclude order notes and action logs
+ add_action( 'comment_feed_where', array( $this, 'filter_comment_feed' ), 10, 2 );
+
+ // Delete comments count cache whenever there is a new comment or a comment status changes
+ add_action( 'wp_insert_comment', array( $this, 'delete_comment_count_cache' ) );
+ add_action( 'wp_set_comment_status', array( $this, 'delete_comment_count_cache' ) );
+ }
+
+ public function disable_comment_counting() {
+ wp_defer_comment_counting(true);
+ }
+ public function enable_comment_counting() {
+ wp_defer_comment_counting(false);
+ }
+
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php
new file mode 100644
index 00000000..3618b1e3
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php
@@ -0,0 +1,860 @@
+validate_action( $action );
+ $post_array = $this->create_post_array( $action, $scheduled_date );
+ $post_id = $this->save_post_array( $post_array );
+ $this->save_post_schedule( $post_id, $action->get_schedule() );
+ $this->save_action_group( $post_id, $action->get_group() );
+ do_action( 'action_scheduler_stored_action', $post_id );
+ return $post_id;
+ } catch ( Exception $e ) {
+ throw new RuntimeException( sprintf( __( 'Error saving action: %s', 'action-scheduler' ), $e->getMessage() ), 0 );
+ }
+ }
+
+ protected function create_post_array( ActionScheduler_Action $action, DateTime $scheduled_date = NULL ) {
+ $post = array(
+ 'post_type' => self::POST_TYPE,
+ 'post_title' => $action->get_hook(),
+ 'post_content' => json_encode($action->get_args()),
+ 'post_status' => ( $action->is_finished() ? 'publish' : 'pending' ),
+ 'post_date_gmt' => $this->get_scheduled_date_string( $action, $scheduled_date ),
+ 'post_date' => $this->get_scheduled_date_string_local( $action, $scheduled_date ),
+ );
+ return $post;
+ }
+
+ protected function save_post_array( $post_array ) {
+ add_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10, 1 );
+ add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 );
+
+ $has_kses = false !== has_filter( 'content_save_pre', 'wp_filter_post_kses' );
+
+ if ( $has_kses ) {
+ // Prevent KSES from corrupting JSON in post_content.
+ kses_remove_filters();
+ }
+
+ $post_id = wp_insert_post($post_array);
+
+ if ( $has_kses ) {
+ kses_init_filters();
+ }
+
+ remove_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10 );
+ remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 );
+
+ if ( is_wp_error($post_id) || empty($post_id) ) {
+ throw new RuntimeException( __( 'Unable to save action.', 'action-scheduler' ) );
+ }
+ return $post_id;
+ }
+
+ public function filter_insert_post_data( $postdata ) {
+ if ( $postdata['post_type'] == self::POST_TYPE ) {
+ $postdata['post_author'] = 0;
+ if ( $postdata['post_status'] == 'future' ) {
+ $postdata['post_status'] = 'publish';
+ }
+ }
+ return $postdata;
+ }
+
+ /**
+ * Create a (probably unique) post name for scheduled actions in a more performant manner than wp_unique_post_slug().
+ *
+ * When an action's post status is transitioned to something other than 'draft', 'pending' or 'auto-draft, like 'publish'
+ * or 'failed' or 'trash', WordPress will find a unique slug (stored in post_name column) using the wp_unique_post_slug()
+ * function. This is done to ensure URL uniqueness. The approach taken by wp_unique_post_slug() is to iterate over existing
+ * post_name values that match, and append a number 1 greater than the largest. This makes sense when manually creating a
+ * post from the Edit Post screen. It becomes a bottleneck when automatically processing thousands of actions, with a
+ * database containing thousands of related post_name values.
+ *
+ * WordPress 5.1 introduces the 'pre_wp_unique_post_slug' filter for plugins to address this issue.
+ *
+ * We can short-circuit WordPress's wp_unique_post_slug() approach using the 'pre_wp_unique_post_slug' filter. This
+ * method is available to be used as a callback on that filter. It provides a more scalable approach to generating a
+ * post_name/slug that is probably unique. Because Action Scheduler never actually uses the post_name field, or an
+ * action's slug, being probably unique is good enough.
+ *
+ * For more backstory on this issue, see:
+ * - https://github.com/woocommerce/action-scheduler/issues/44 and
+ * - https://core.trac.wordpress.org/ticket/21112
+ *
+ * @param string $override_slug Short-circuit return value.
+ * @param string $slug The desired slug (post_name).
+ * @param int $post_ID Post ID.
+ * @param string $post_status The post status.
+ * @param string $post_type Post type.
+ * @return string
+ */
+ public function set_unique_post_slug( $override_slug, $slug, $post_ID, $post_status, $post_type ) {
+ if ( self::POST_TYPE == $post_type ) {
+ $override_slug = uniqid( self::POST_TYPE . '-', true ) . '-' . wp_generate_password( 32, false );
+ }
+ return $override_slug;
+ }
+
+ protected function save_post_schedule( $post_id, $schedule ) {
+ update_post_meta( $post_id, self::SCHEDULE_META_KEY, $schedule );
+ }
+
+ protected function save_action_group( $post_id, $group ) {
+ if ( empty($group) ) {
+ wp_set_object_terms( $post_id, array(), self::GROUP_TAXONOMY, FALSE );
+ } else {
+ wp_set_object_terms( $post_id, array($group), self::GROUP_TAXONOMY, FALSE );
+ }
+ }
+
+ public function fetch_action( $action_id ) {
+ $post = $this->get_post( $action_id );
+ if ( empty($post) || $post->post_type != self::POST_TYPE ) {
+ return $this->get_null_action();
+ }
+
+ try {
+ $action = $this->make_action_from_post( $post );
+ } catch ( ActionScheduler_InvalidActionException $exception ) {
+ do_action( 'action_scheduler_failed_fetch_action', $post->ID, $exception );
+ return $this->get_null_action();
+ }
+
+ return $action;
+ }
+
+ protected function get_post( $action_id ) {
+ if ( empty($action_id) ) {
+ return NULL;
+ }
+ return get_post($action_id);
+ }
+
+ protected function get_null_action() {
+ return new ActionScheduler_NullAction();
+ }
+
+ protected function make_action_from_post( $post ) {
+ $hook = $post->post_title;
+
+ $args = json_decode( $post->post_content, true );
+ $this->validate_args( $args, $post->ID );
+
+ $schedule = get_post_meta( $post->ID, self::SCHEDULE_META_KEY, true );
+ $this->validate_schedule( $schedule, $post->ID );
+
+ $group = wp_get_object_terms( $post->ID, self::GROUP_TAXONOMY, array('fields' => 'names') );
+ $group = empty( $group ) ? '' : reset($group);
+
+ return ActionScheduler::factory()->get_stored_action( $this->get_action_status_by_post_status( $post->post_status ), $hook, $args, $schedule, $group );
+ }
+
+ /**
+ * @param string $post_status
+ *
+ * @throws InvalidArgumentException if $post_status not in known status fields returned by $this->get_status_labels()
+ * @return string
+ */
+ protected function get_action_status_by_post_status( $post_status ) {
+
+ switch ( $post_status ) {
+ case 'publish' :
+ $action_status = self::STATUS_COMPLETE;
+ break;
+ case 'trash' :
+ $action_status = self::STATUS_CANCELED;
+ break;
+ default :
+ if ( ! array_key_exists( $post_status, $this->get_status_labels() ) ) {
+ throw new InvalidArgumentException( sprintf( 'Invalid post status: "%s". No matching action status available.', $post_status ) );
+ }
+ $action_status = $post_status;
+ break;
+ }
+
+ return $action_status;
+ }
+
+ /**
+ * @param string $action_status
+ * @throws InvalidArgumentException if $post_status not in known status fields returned by $this->get_status_labels()
+ * @return string
+ */
+ protected function get_post_status_by_action_status( $action_status ) {
+
+ switch ( $action_status ) {
+ case self::STATUS_COMPLETE :
+ $post_status = 'publish';
+ break;
+ case self::STATUS_CANCELED :
+ $post_status = 'trash';
+ break;
+ default :
+ if ( ! array_key_exists( $action_status, $this->get_status_labels() ) ) {
+ throw new InvalidArgumentException( sprintf( 'Invalid action status: "%s".', $action_status ) );
+ }
+ $post_status = $action_status;
+ break;
+ }
+
+ return $post_status;
+ }
+
+ /**
+ * @param string $hook
+ * @param array $params
+ *
+ * @return string ID of the next action matching the criteria or NULL if not found
+ */
+ public function find_action( $hook, $params = array() ) {
+ $params = wp_parse_args( $params, array(
+ 'args' => NULL,
+ 'status' => ActionScheduler_Store::STATUS_PENDING,
+ 'group' => '',
+ ));
+ /** @var wpdb $wpdb */
+ global $wpdb;
+ $query = "SELECT p.ID FROM {$wpdb->posts} p";
+ $args = array();
+ if ( !empty($params['group']) ) {
+ $query .= " INNER JOIN {$wpdb->term_relationships} tr ON tr.object_id=p.ID";
+ $query .= " INNER JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id=tt.term_taxonomy_id";
+ $query .= " INNER JOIN {$wpdb->terms} t ON tt.term_id=t.term_id AND t.slug=%s";
+ $args[] = $params['group'];
+ }
+ $query .= " WHERE p.post_title=%s";
+ $args[] = $hook;
+ $query .= " AND p.post_type=%s";
+ $args[] = self::POST_TYPE;
+ if ( !is_null($params['args']) ) {
+ $query .= " AND p.post_content=%s";
+ $args[] = json_encode($params['args']);
+ }
+
+ if ( ! empty( $params['status'] ) ) {
+ $query .= " AND p.post_status=%s";
+ $args[] = $this->get_post_status_by_action_status( $params['status'] );
+ }
+
+ switch ( $params['status'] ) {
+ case self::STATUS_COMPLETE:
+ case self::STATUS_RUNNING:
+ case self::STATUS_FAILED:
+ $order = 'DESC'; // Find the most recent action that matches
+ break;
+ case self::STATUS_PENDING:
+ default:
+ $order = 'ASC'; // Find the next action that matches
+ break;
+ }
+ $query .= " ORDER BY post_date_gmt $order LIMIT 1";
+
+ $query = $wpdb->prepare( $query, $args );
+
+ $id = $wpdb->get_var($query);
+ return $id;
+ }
+
+ /**
+ * Returns the SQL statement to query (or count) actions.
+ *
+ * @param array $query Filtering options
+ * @param string $select_or_count Whether the SQL should select and return the IDs or just the row count
+ * @throws InvalidArgumentException if $select_or_count not count or select
+ * @return string SQL statement. The returned SQL is already properly escaped.
+ */
+ protected function get_query_actions_sql( array $query, $select_or_count = 'select' ) {
+
+ if ( ! in_array( $select_or_count, array( 'select', 'count' ) ) ) {
+ throw new InvalidArgumentException( __( 'Invalid schedule. Cannot save action.', 'action-scheduler' ) );
+ }
+
+ $query = wp_parse_args( $query, array(
+ 'hook' => '',
+ 'args' => NULL,
+ 'date' => NULL,
+ 'date_compare' => '<=',
+ 'modified' => NULL,
+ 'modified_compare' => '<=',
+ 'group' => '',
+ 'status' => '',
+ 'claimed' => NULL,
+ 'per_page' => 5,
+ 'offset' => 0,
+ 'orderby' => 'date',
+ 'order' => 'ASC',
+ 'search' => '',
+ ) );
+
+ /** @var wpdb $wpdb */
+ global $wpdb;
+ $sql = ( 'count' === $select_or_count ) ? 'SELECT count(p.ID)' : 'SELECT p.ID ';
+ $sql .= "FROM {$wpdb->posts} p";
+ $sql_params = array();
+ if ( empty( $query['group'] ) && 'group' === $query['orderby'] ) {
+ $sql .= " LEFT JOIN {$wpdb->term_relationships} tr ON tr.object_id=p.ID";
+ $sql .= " LEFT JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id=tt.term_taxonomy_id";
+ $sql .= " LEFT JOIN {$wpdb->terms} t ON tt.term_id=t.term_id";
+ } elseif ( ! empty( $query['group'] ) ) {
+ $sql .= " INNER JOIN {$wpdb->term_relationships} tr ON tr.object_id=p.ID";
+ $sql .= " INNER JOIN {$wpdb->term_taxonomy} tt ON tr.term_taxonomy_id=tt.term_taxonomy_id";
+ $sql .= " INNER JOIN {$wpdb->terms} t ON tt.term_id=t.term_id";
+ $sql .= " AND t.slug=%s";
+ $sql_params[] = $query['group'];
+ }
+ $sql .= " WHERE post_type=%s";
+ $sql_params[] = self::POST_TYPE;
+ if ( $query['hook'] ) {
+ $sql .= " AND p.post_title=%s";
+ $sql_params[] = $query['hook'];
+ }
+ if ( !is_null($query['args']) ) {
+ $sql .= " AND p.post_content=%s";
+ $sql_params[] = json_encode($query['args']);
+ }
+
+ if ( ! empty( $query['status'] ) ) {
+ $sql .= " AND p.post_status=%s";
+ $sql_params[] = $this->get_post_status_by_action_status( $query['status'] );
+ }
+
+ if ( $query['date'] instanceof DateTime ) {
+ $date = clone $query['date'];
+ $date->setTimezone( new DateTimeZone('UTC') );
+ $date_string = $date->format('Y-m-d H:i:s');
+ $comparator = $this->validate_sql_comparator($query['date_compare']);
+ $sql .= " AND p.post_date_gmt $comparator %s";
+ $sql_params[] = $date_string;
+ }
+
+ if ( $query['modified'] instanceof DateTime ) {
+ $modified = clone $query['modified'];
+ $modified->setTimezone( new DateTimeZone('UTC') );
+ $date_string = $modified->format('Y-m-d H:i:s');
+ $comparator = $this->validate_sql_comparator($query['modified_compare']);
+ $sql .= " AND p.post_modified_gmt $comparator %s";
+ $sql_params[] = $date_string;
+ }
+
+ if ( $query['claimed'] === TRUE ) {
+ $sql .= " AND p.post_password != ''";
+ } elseif ( $query['claimed'] === FALSE ) {
+ $sql .= " AND p.post_password = ''";
+ } elseif ( !is_null($query['claimed']) ) {
+ $sql .= " AND p.post_password = %s";
+ $sql_params[] = $query['claimed'];
+ }
+
+ if ( ! empty( $query['search'] ) ) {
+ $sql .= " AND (p.post_title LIKE %s OR p.post_content LIKE %s OR p.post_password LIKE %s)";
+ for( $i = 0; $i < 3; $i++ ) {
+ $sql_params[] = sprintf( '%%%s%%', $query['search'] );
+ }
+ }
+
+ if ( 'select' === $select_or_count ) {
+ switch ( $query['orderby'] ) {
+ case 'hook':
+ $orderby = 'p.post_title';
+ break;
+ case 'group':
+ $orderby = 't.name';
+ break;
+ case 'status':
+ $orderby = 'p.post_status';
+ break;
+ case 'modified':
+ $orderby = 'p.post_modified';
+ break;
+ case 'claim_id':
+ $orderby = 'p.post_password';
+ break;
+ case 'schedule':
+ case 'date':
+ default:
+ $orderby = 'p.post_date_gmt';
+ break;
+ }
+ if ( 'ASC' === strtoupper( $query['order'] ) ) {
+ $order = 'ASC';
+ } else {
+ $order = 'DESC';
+ }
+ $sql .= " ORDER BY $orderby $order";
+ if ( $query['per_page'] > 0 ) {
+ $sql .= " LIMIT %d, %d";
+ $sql_params[] = $query['offset'];
+ $sql_params[] = $query['per_page'];
+ }
+ }
+
+ return $wpdb->prepare( $sql, $sql_params );
+ }
+
+ /**
+ * @param array $query
+ * @param string $query_type Whether to select or count the results. Default, select.
+ * @return string|array The IDs of actions matching the query
+ */
+ public function query_actions( $query = array(), $query_type = 'select' ) {
+ /** @var wpdb $wpdb */
+ global $wpdb;
+
+ $sql = $this->get_query_actions_sql( $query, $query_type );
+
+ return ( 'count' === $query_type ) ? $wpdb->get_var( $sql ) : $wpdb->get_col( $sql );
+ }
+
+ /**
+ * Get a count of all actions in the store, grouped by status
+ *
+ * @return array
+ */
+ public function action_counts() {
+
+ $action_counts_by_status = array();
+ $action_stati_and_labels = $this->get_status_labels();
+ $posts_count_by_status = (array) wp_count_posts( self::POST_TYPE, 'readable' );
+
+ foreach ( $posts_count_by_status as $post_status_name => $count ) {
+
+ try {
+ $action_status_name = $this->get_action_status_by_post_status( $post_status_name );
+ } catch ( Exception $e ) {
+ // Ignore any post statuses that aren't for actions
+ continue;
+ }
+ if ( array_key_exists( $action_status_name, $action_stati_and_labels ) ) {
+ $action_counts_by_status[ $action_status_name ] = $count;
+ }
+ }
+
+ return $action_counts_by_status;
+ }
+
+ /**
+ * @param string $action_id
+ *
+ * @throws InvalidArgumentException
+ */
+ public function cancel_action( $action_id ) {
+ $post = get_post( $action_id );
+ if ( empty( $post ) || ( $post->post_type != self::POST_TYPE ) ) {
+ throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) );
+ }
+ do_action( 'action_scheduler_canceled_action', $action_id );
+ add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 );
+ wp_trash_post( $action_id );
+ remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 );
+ }
+
+ public function delete_action( $action_id ) {
+ $post = get_post( $action_id );
+ if ( empty( $post ) || ( $post->post_type != self::POST_TYPE ) ) {
+ throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) );
+ }
+ do_action( 'action_scheduler_deleted_action', $action_id );
+
+ wp_delete_post( $action_id, TRUE );
+ }
+
+ /**
+ * @param string $action_id
+ *
+ * @throws InvalidArgumentException
+ * @return ActionScheduler_DateTime The date the action is schedule to run, or the date that it ran.
+ */
+ public function get_date( $action_id ) {
+ $next = $this->get_date_gmt( $action_id );
+ return ActionScheduler_TimezoneHelper::set_local_timezone( $next );
+ }
+
+ /**
+ * @param string $action_id
+ *
+ * @throws InvalidArgumentException
+ * @return ActionScheduler_DateTime The date the action is schedule to run, or the date that it ran.
+ */
+ public function get_date_gmt( $action_id ) {
+ $post = get_post( $action_id );
+ if ( empty( $post ) || ( $post->post_type != self::POST_TYPE ) ) {
+ throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) );
+ }
+ if ( $post->post_status == 'publish' ) {
+ return as_get_datetime_object( $post->post_modified_gmt );
+ } else {
+ return as_get_datetime_object( $post->post_date_gmt );
+ }
+ }
+
+ /**
+ * @param int $max_actions
+ * @param DateTime $before_date Jobs must be schedule before this date. Defaults to now.
+ * @param array $hooks Claim only actions with a hook or hooks.
+ * @param string $group Claim only actions in the given group.
+ *
+ * @return ActionScheduler_ActionClaim
+ * @throws RuntimeException When there is an error staking a claim.
+ * @throws InvalidArgumentException When the given group is not valid.
+ */
+ public function stake_claim( $max_actions = 10, DateTime $before_date = null, $hooks = array(), $group = '' ) {
+ $claim_id = $this->generate_claim_id();
+ $this->claim_actions( $claim_id, $max_actions, $before_date, $hooks, $group );
+ $action_ids = $this->find_actions_by_claim_id( $claim_id );
+
+ return new ActionScheduler_ActionClaim( $claim_id, $action_ids );
+ }
+
+ /**
+ * @return int
+ */
+ public function get_claim_count(){
+ global $wpdb;
+
+ $sql = "SELECT COUNT(DISTINCT post_password) FROM {$wpdb->posts} WHERE post_password != '' AND post_type = %s AND post_status IN ('in-progress','pending')";
+ $sql = $wpdb->prepare( $sql, array( self::POST_TYPE ) );
+
+ return $wpdb->get_var( $sql );
+ }
+
+ protected function generate_claim_id() {
+ $claim_id = md5(microtime(true) . rand(0,1000));
+ return substr($claim_id, 0, 20); // to fit in db field with 20 char limit
+ }
+
+ /**
+ * @param string $claim_id
+ * @param int $limit
+ * @param DateTime $before_date Should use UTC timezone.
+ * @param array $hooks Claim only actions with a hook or hooks.
+ * @param string $group Claim only actions in the given group.
+ *
+ * @return int The number of actions that were claimed
+ * @throws RuntimeException When there is a database error.
+ * @throws InvalidArgumentException When the group is invalid.
+ */
+ protected function claim_actions( $claim_id, $limit, DateTime $before_date = null, $hooks = array(), $group = '' ) {
+ // Set up initial variables.
+ $date = null === $before_date ? as_get_datetime_object() : clone $before_date;
+ $limit_ids = ! empty( $group );
+ $ids = $limit_ids ? $this->get_actions_by_group( $group, $limit, $date ) : array();
+
+ // If limiting by IDs and no posts found, then return early since we have nothing to update.
+ if ( $limit_ids && 0 === count( $ids ) ) {
+ return 0;
+ }
+
+ /** @var wpdb $wpdb */
+ global $wpdb;
+
+ /*
+ * Build up custom query to update the affected posts. Parameters are built as a separate array
+ * to make it easier to identify where they are in the query.
+ *
+ * We can't use $wpdb->update() here because of the "ID IN ..." clause.
+ */
+ $update = "UPDATE {$wpdb->posts} SET post_password = %s, post_modified_gmt = %s, post_modified = %s";
+ $params = array(
+ $claim_id,
+ current_time( 'mysql', true ),
+ current_time( 'mysql' ),
+ );
+
+ // Build initial WHERE clause.
+ $where = "WHERE post_type = %s AND post_status = %s AND post_password = ''";
+ $params[] = self::POST_TYPE;
+ $params[] = ActionScheduler_Store::STATUS_PENDING;
+
+ if ( ! empty( $hooks ) ) {
+ $placeholders = array_fill( 0, count( $hooks ), '%s' );
+ $where .= ' AND post_title IN (' . join( ', ', $placeholders ) . ')';
+ $params = array_merge( $params, array_values( $hooks ) );
+ }
+
+ /*
+ * Add the IDs to the WHERE clause. IDs not escaped because they came directly from a prior DB query.
+ *
+ * If we're not limiting by IDs, then include the post_date_gmt clause.
+ */
+ if ( $limit_ids ) {
+ $where .= ' AND ID IN (' . join( ',', $ids ) . ')';
+ } else {
+ $where .= ' AND post_date_gmt <= %s';
+ $params[] = $date->format( 'Y-m-d H:i:s' );
+ }
+
+ // Add the ORDER BY clause and,ms limit.
+ $order = 'ORDER BY menu_order ASC, post_date_gmt ASC, ID ASC LIMIT %d';
+ $params[] = $limit;
+
+ // Run the query and gather results.
+ $rows_affected = $wpdb->query( $wpdb->prepare( "{$update} {$where} {$order}", $params ) );
+ if ( $rows_affected === false ) {
+ throw new RuntimeException( __( 'Unable to claim actions. Database error.', 'action-scheduler' ) );
+ }
+
+ return (int) $rows_affected;
+ }
+
+ /**
+ * Get IDs of actions within a certain group and up to a certain date/time.
+ *
+ * @param string $group The group to use in finding actions.
+ * @param int $limit The number of actions to retrieve.
+ * @param DateTime $date DateTime object representing cutoff time for actions. Actions retrieved will be
+ * up to and including this DateTime.
+ *
+ * @return array IDs of actions in the appropriate group and before the appropriate time.
+ * @throws InvalidArgumentException When the group does not exist.
+ */
+ protected function get_actions_by_group( $group, $limit, DateTime $date ) {
+ // Ensure the group exists before continuing.
+ if ( ! term_exists( $group, self::GROUP_TAXONOMY )) {
+ throw new InvalidArgumentException( sprintf( __( 'The group "%s" does not exist.', 'action-scheduler' ), $group ) );
+ }
+
+ // Set up a query for post IDs to use later.
+ $query = new WP_Query();
+ $query_args = array(
+ 'fields' => 'ids',
+ 'post_type' => self::POST_TYPE,
+ 'post_status' => ActionScheduler_Store::STATUS_PENDING,
+ 'has_password' => false,
+ 'posts_per_page' => $limit * 3,
+ 'suppress_filters' => true,
+ 'no_found_rows' => true,
+ 'orderby' => array(
+ 'menu_order' => 'ASC',
+ 'date' => 'ASC',
+ 'ID' => 'ASC',
+ ),
+ 'date_query' => array(
+ 'column' => 'post_date_gmt',
+ 'before' => $date->format( 'Y-m-d H:i' ),
+ 'inclusive' => true,
+ ),
+ 'tax_query' => array(
+ array(
+ 'taxonomy' => self::GROUP_TAXONOMY,
+ 'field' => 'slug',
+ 'terms' => $group,
+ 'include_children' => false,
+ ),
+ ),
+ );
+
+ return $query->query( $query_args );
+ }
+
+ /**
+ * @param string $claim_id
+ * @return array
+ */
+ public function find_actions_by_claim_id( $claim_id ) {
+ /** @var wpdb $wpdb */
+ global $wpdb;
+ $sql = "SELECT ID FROM {$wpdb->posts} WHERE post_type = %s AND post_password = %s";
+ $sql = $wpdb->prepare( $sql, array( self::POST_TYPE, $claim_id ) );
+ $action_ids = $wpdb->get_col( $sql );
+ return $action_ids;
+ }
+
+ public function release_claim( ActionScheduler_ActionClaim $claim ) {
+ $action_ids = $this->find_actions_by_claim_id( $claim->get_id() );
+ if ( empty( $action_ids ) ) {
+ return; // nothing to do
+ }
+ $action_id_string = implode( ',', array_map( 'intval', $action_ids ) );
+ /** @var wpdb $wpdb */
+ global $wpdb;
+ $sql = "UPDATE {$wpdb->posts} SET post_password = '' WHERE ID IN ($action_id_string) AND post_password = %s";
+ $sql = $wpdb->prepare( $sql, array( $claim->get_id() ) );
+ $result = $wpdb->query( $sql );
+ if ( $result === false ) {
+ /* translators: %s: claim ID */
+ throw new RuntimeException( sprintf( __( 'Unable to unlock claim %s. Database error.', 'action-scheduler' ), $claim->get_id() ) );
+ }
+ }
+
+ /**
+ * @param string $action_id
+ */
+ public function unclaim_action( $action_id ) {
+ /** @var wpdb $wpdb */
+ global $wpdb;
+ $sql = "UPDATE {$wpdb->posts} SET post_password = '' WHERE ID = %d AND post_type = %s";
+ $sql = $wpdb->prepare( $sql, $action_id, self::POST_TYPE );
+ $result = $wpdb->query( $sql );
+ if ( $result === false ) {
+ /* translators: %s: action ID */
+ throw new RuntimeException( sprintf( __( 'Unable to unlock claim on action %s. Database error.', 'action-scheduler' ), $action_id ) );
+ }
+ }
+
+ public function mark_failure( $action_id ) {
+ /** @var wpdb $wpdb */
+ global $wpdb;
+ $sql = "UPDATE {$wpdb->posts} SET post_status = %s WHERE ID = %d AND post_type = %s";
+ $sql = $wpdb->prepare( $sql, self::STATUS_FAILED, $action_id, self::POST_TYPE );
+ $result = $wpdb->query( $sql );
+ if ( $result === false ) {
+ /* translators: %s: action ID */
+ throw new RuntimeException( sprintf( __( 'Unable to mark failure on action %s. Database error.', 'action-scheduler' ), $action_id ) );
+ }
+ }
+
+ /**
+ * Return an action's claim ID, as stored in the post password column
+ *
+ * @param string $action_id
+ * @return mixed
+ */
+ public function get_claim_id( $action_id ) {
+ return $this->get_post_column( $action_id, 'post_password' );
+ }
+
+ /**
+ * Return an action's status, as stored in the post status column
+ *
+ * @param string $action_id
+ * @return mixed
+ */
+ public function get_status( $action_id ) {
+ $status = $this->get_post_column( $action_id, 'post_status' );
+
+ if ( $status === null ) {
+ throw new InvalidArgumentException( __( 'Invalid action ID. No status found.', 'action-scheduler' ) );
+ }
+
+ return $this->get_action_status_by_post_status( $status );
+ }
+
+ private function get_post_column( $action_id, $column_name ) {
+ /** @var \wpdb $wpdb */
+ global $wpdb;
+ return $wpdb->get_var( $wpdb->prepare( "SELECT {$column_name} FROM {$wpdb->posts} WHERE ID=%d AND post_type=%s", $action_id, self::POST_TYPE ) );
+ }
+
+ /**
+ * @param string $action_id
+ */
+ public function log_execution( $action_id ) {
+ /** @var wpdb $wpdb */
+ global $wpdb;
+
+ $sql = "UPDATE {$wpdb->posts} SET menu_order = menu_order+1, post_status=%s, post_modified_gmt = %s, post_modified = %s WHERE ID = %d AND post_type = %s";
+ $sql = $wpdb->prepare( $sql, self::STATUS_RUNNING, current_time('mysql', true), current_time('mysql'), $action_id, self::POST_TYPE );
+ $wpdb->query($sql);
+ }
+
+ /**
+ * Record that an action was completed.
+ *
+ * @param int $action_id ID of the completed action.
+ * @throws InvalidArgumentException|RuntimeException
+ */
+ public function mark_complete( $action_id ) {
+ $post = get_post( $action_id );
+ if ( empty( $post ) || ( $post->post_type != self::POST_TYPE ) ) {
+ throw new InvalidArgumentException( sprintf( __( 'Unidentified action %s', 'action-scheduler' ), $action_id ) );
+ }
+ add_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10, 1 );
+ add_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10, 5 );
+ $result = wp_update_post(array(
+ 'ID' => $action_id,
+ 'post_status' => 'publish',
+ ), TRUE);
+ remove_filter( 'wp_insert_post_data', array( $this, 'filter_insert_post_data' ), 10 );
+ remove_filter( 'pre_wp_unique_post_slug', array( $this, 'set_unique_post_slug' ), 10 );
+ if ( is_wp_error( $result ) ) {
+ throw new RuntimeException( $result->get_error_message() );
+ }
+ }
+
+ /**
+ * Mark action as migrated when there is an error deleting the action.
+ *
+ * @param int $action_id Action ID.
+ */
+ public function mark_migrated( $action_id ) {
+ wp_update_post(
+ array(
+ 'ID' => $action_id,
+ 'post_status' => 'migrated'
+ )
+ );
+ }
+
+ /**
+ * Determine whether the post store can be migrated.
+ *
+ * @return bool
+ */
+ public function migration_dependencies_met( $setting ) {
+ global $wpdb;
+
+ $dependencies_met = get_transient( self::DEPENDENCIES_MET );
+ if ( empty( $dependencies_met ) ) {
+ $maximum_args_length = apply_filters( 'action_scheduler_maximum_args_length', 191 );
+ $found_action = $wpdb->get_var(
+ $wpdb->prepare(
+ "SELECT ID FROM {$wpdb->posts} WHERE post_type = %s AND CHAR_LENGTH(post_content) > %d LIMIT 1",
+ $maximum_args_length,
+ self::POST_TYPE
+ )
+ );
+ $dependencies_met = $found_action ? 'no' : 'yes';
+ set_transient( self::DEPENDENCIES_MET, $dependencies_met, DAY_IN_SECONDS );
+ }
+
+ return 'yes' == $dependencies_met ? $setting : false;
+ }
+
+ /**
+ * InnoDB indexes have a maximum size of 767 bytes by default, which is only 191 characters with utf8mb4.
+ *
+ * Previously, AS wasn't concerned about args length, as we used the (unindex) post_content column. However,
+ * as we prepare to move to custom tables, and can use an indexed VARCHAR column instead, we want to warn
+ * developers of this impending requirement.
+ *
+ * @param ActionScheduler_Action $action
+ */
+ protected function validate_action( ActionScheduler_Action $action ) {
+ try {
+ parent::validate_action( $action );
+ } catch ( Exception $e ) {
+ $message = sprintf( __( '%s Support for strings longer than this will be removed in a future version.', 'action-scheduler' ), $e->getMessage() );
+ _doing_it_wrong( 'ActionScheduler_Action::$args', $message, '2.1.0' );
+ }
+ }
+
+ /**
+ * @codeCoverageIgnore
+ */
+ public function init() {
+ add_filter( 'action_scheduler_migration_dependencies_met', array( $this, 'migration_dependencies_met' ) );
+
+ $post_type_registrar = new ActionScheduler_wpPostStore_PostTypeRegistrar();
+ $post_type_registrar->register();
+
+ $post_status_registrar = new ActionScheduler_wpPostStore_PostStatusRegistrar();
+ $post_status_registrar->register();
+
+ $taxonomy_registrar = new ActionScheduler_wpPostStore_TaxonomyRegistrar();
+ $taxonomy_registrar->register();
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostStatusRegistrar.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostStatusRegistrar.php
new file mode 100644
index 00000000..246bc347
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostStatusRegistrar.php
@@ -0,0 +1,58 @@
+post_status_args(), $this->post_status_running_labels() ) );
+ register_post_status( ActionScheduler_Store::STATUS_FAILED, array_merge( $this->post_status_args(), $this->post_status_failed_labels() ) );
+ }
+
+ /**
+ * Build the args array for the post type definition
+ *
+ * @return array
+ */
+ protected function post_status_args() {
+ $args = array(
+ 'public' => false,
+ 'exclude_from_search' => false,
+ 'show_in_admin_all_list' => true,
+ 'show_in_admin_status_list' => true,
+ );
+
+ return apply_filters( 'action_scheduler_post_status_args', $args );
+ }
+
+ /**
+ * Build the args array for the post type definition
+ *
+ * @return array
+ */
+ protected function post_status_failed_labels() {
+ $labels = array(
+ 'label' => _x( 'Failed', 'post', 'action-scheduler' ),
+ /* translators: %s: count */
+ 'label_count' => _n_noop( 'Failed (%s)', 'Failed (%s)', 'action-scheduler' ),
+ );
+
+ return apply_filters( 'action_scheduler_post_status_failed_labels', $labels );
+ }
+
+ /**
+ * Build the args array for the post type definition
+ *
+ * @return array
+ */
+ protected function post_status_running_labels() {
+ $labels = array(
+ 'label' => _x( 'In-Progress', 'post', 'action-scheduler' ),
+ /* translators: %s: count */
+ 'label_count' => _n_noop( 'In-Progress (%s)', 'In-Progress (%s)', 'action-scheduler' ),
+ );
+
+ return apply_filters( 'action_scheduler_post_status_running_labels', $labels );
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostTypeRegistrar.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostTypeRegistrar.php
new file mode 100644
index 00000000..8c63bd0f
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_PostTypeRegistrar.php
@@ -0,0 +1,50 @@
+post_type_args() );
+ }
+
+ /**
+ * Build the args array for the post type definition
+ *
+ * @return array
+ */
+ protected function post_type_args() {
+ $args = array(
+ 'label' => __( 'Scheduled Actions', 'action-scheduler' ),
+ 'description' => __( 'Scheduled actions are hooks triggered on a cetain date and time.', 'action-scheduler' ),
+ 'public' => false,
+ 'map_meta_cap' => true,
+ 'hierarchical' => false,
+ 'supports' => array('title', 'editor','comments'),
+ 'rewrite' => false,
+ 'query_var' => false,
+ 'can_export' => true,
+ 'ep_mask' => EP_NONE,
+ 'labels' => array(
+ 'name' => __( 'Scheduled Actions', 'action-scheduler' ),
+ 'singular_name' => __( 'Scheduled Action', 'action-scheduler' ),
+ 'menu_name' => _x( 'Scheduled Actions', 'Admin menu name', 'action-scheduler' ),
+ 'add_new' => __( 'Add', 'action-scheduler' ),
+ 'add_new_item' => __( 'Add New Scheduled Action', 'action-scheduler' ),
+ 'edit' => __( 'Edit', 'action-scheduler' ),
+ 'edit_item' => __( 'Edit Scheduled Action', 'action-scheduler' ),
+ 'new_item' => __( 'New Scheduled Action', 'action-scheduler' ),
+ 'view' => __( 'View Action', 'action-scheduler' ),
+ 'view_item' => __( 'View Action', 'action-scheduler' ),
+ 'search_items' => __( 'Search Scheduled Actions', 'action-scheduler' ),
+ 'not_found' => __( 'No actions found', 'action-scheduler' ),
+ 'not_found_in_trash' => __( 'No actions found in trash', 'action-scheduler' ),
+ ),
+ );
+
+ $args = apply_filters('action_scheduler_post_type_args', $args);
+ return $args;
+ }
+}
+
\ No newline at end of file
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_TaxonomyRegistrar.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_TaxonomyRegistrar.php
new file mode 100644
index 00000000..367401f7
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore_TaxonomyRegistrar.php
@@ -0,0 +1,26 @@
+taxonomy_args() );
+ }
+
+ protected function taxonomy_args() {
+ $args = array(
+ 'label' => __( 'Action Group', 'action-scheduler' ),
+ 'public' => false,
+ 'hierarchical' => false,
+ 'show_admin_column' => true,
+ 'query_var' => false,
+ 'rewrite' => false,
+ );
+
+ $args = apply_filters( 'action_scheduler_taxonomy_args', $args );
+ return $args;
+ }
+}
+
\ No newline at end of file
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionMigrator.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionMigrator.php
new file mode 100644
index 00000000..c77d0832
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionMigrator.php
@@ -0,0 +1,109 @@
+source = $source_store;
+ $this->destination = $destination_store;
+ $this->log_migrator = $log_migrator;
+ }
+
+ /**
+ * Migrate an action.
+ *
+ * @param int $source_action_id Action ID.
+ *
+ * @return int 0|new action ID
+ */
+ public function migrate( $source_action_id ) {
+ try {
+ $action = $this->source->fetch_action( $source_action_id );
+ $status = $this->source->get_status( $source_action_id );
+ } catch ( \Exception $e ) {
+ $action = null;
+ $status = '';
+ }
+
+ if ( is_null( $action ) || empty( $status ) || ! $action->get_schedule()->get_date() ) {
+ // null action or empty status means the fetch operation failed or the action didn't exist
+ // null schedule means it's missing vital data
+ // delete it and move on
+ try {
+ $this->source->delete_action( $source_action_id );
+ } catch ( \Exception $e ) {
+ // nothing to do, it didn't exist in the first place
+ }
+ do_action( 'action_scheduler/no_action_to_migrate', $source_action_id, $this->source, $this->destination );
+
+ return 0;
+ }
+
+ try {
+
+ // Make sure the last attempt date is set correctly for completed and failed actions
+ $last_attempt_date = ( $status !== \ActionScheduler_Store::STATUS_PENDING ) ? $this->source->get_date( $source_action_id ) : null;
+
+ $destination_action_id = $this->destination->save_action( $action, null, $last_attempt_date );
+ } catch ( \Exception $e ) {
+ do_action( 'action_scheduler/migrate_action_failed', $source_action_id, $this->source, $this->destination );
+
+ return 0; // could not save the action in the new store
+ }
+
+ try {
+ switch ( $status ) {
+ case \ActionScheduler_Store::STATUS_FAILED :
+ $this->destination->mark_failure( $destination_action_id );
+ break;
+ case \ActionScheduler_Store::STATUS_CANCELED :
+ $this->destination->cancel_action( $destination_action_id );
+ break;
+ }
+
+ $this->log_migrator->migrate( $source_action_id, $destination_action_id );
+ $this->source->delete_action( $source_action_id );
+
+ $test_action = $this->source->fetch_action( $source_action_id );
+ if ( ! is_a( $test_action, 'ActionScheduler_NullAction' ) ) {
+ throw new \RuntimeException( sprintf( __( 'Unable to remove source migrated action %s', 'action-scheduler' ), $source_action_id ) );
+ }
+ do_action( 'action_scheduler/migrated_action', $source_action_id, $destination_action_id, $this->source, $this->destination );
+
+ return $destination_action_id;
+ } catch ( \Exception $e ) {
+ // could not delete from the old store
+ $this->source->mark_migrated( $source_action_id );
+ do_action( 'action_scheduler/migrate_action_incomplete', $source_action_id, $destination_action_id, $this->source, $this->destination );
+ do_action( 'action_scheduler/migrated_action', $source_action_id, $destination_action_id, $this->source, $this->destination );
+
+ return $destination_action_id;
+ }
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php
new file mode 100644
index 00000000..41c21da2
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php
@@ -0,0 +1,47 @@
+ $this->get_scheduled_date_string( $action, $last_attempt_date ),
+ 'last_attempt_local' => $this->get_scheduled_date_string_local( $action, $last_attempt_date ),
+ ];
+
+ $wpdb->update( $wpdb->actionscheduler_actions, $data, array( 'action_id' => $action_id ), array( '%s', '%s' ), array( '%d' ) );
+ }
+
+ return $action_id;
+ } catch ( \Exception $e ) {
+ throw new \RuntimeException( sprintf( __( 'Error saving action: %s', 'action-scheduler' ), $e->getMessage() ), 0 );
+ }
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/BatchFetcher.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/BatchFetcher.php
new file mode 100644
index 00000000..48728010
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/BatchFetcher.php
@@ -0,0 +1,86 @@
+store = $source_store;
+ }
+
+ /**
+ * Retrieve a list of actions.
+ *
+ * @param int $count The number of actions to retrieve
+ *
+ * @return int[] A list of action IDs
+ */
+ public function fetch( $count = 10 ) {
+ foreach ( $this->get_query_strategies( $count ) as $query ) {
+ $action_ids = $this->store->query_actions( $query );
+ if ( ! empty( $action_ids ) ) {
+ return $action_ids;
+ }
+ }
+
+ return [];
+ }
+
+ /**
+ * Generate a list of prioritized of action search parameters.
+ *
+ * @param int $count Number of actions to find.
+ *
+ * @return array
+ */
+ private function get_query_strategies( $count ) {
+ $now = as_get_datetime_object();
+ $args = [
+ 'date' => $now,
+ 'per_page' => $count,
+ 'offset' => 0,
+ 'orderby' => 'date',
+ 'order' => 'ASC',
+ ];
+
+ $priorities = [
+ Store::STATUS_PENDING,
+ Store::STATUS_FAILED,
+ Store::STATUS_CANCELED,
+ Store::STATUS_COMPLETE,
+ Store::STATUS_RUNNING,
+ '', // any other unanticipated status
+ ];
+
+ foreach ( $priorities as $status ) {
+ yield wp_parse_args( [
+ 'status' => $status,
+ 'date_compare' => '<=',
+ ], $args );
+ yield wp_parse_args( [
+ 'status' => $status,
+ 'date_compare' => '>=',
+ ], $args );
+ }
+ }
+}
\ No newline at end of file
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Config.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Config.php
new file mode 100644
index 00000000..50f41ff4
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Config.php
@@ -0,0 +1,168 @@
+source_store ) ) {
+ throw new \RuntimeException( __( 'Source store must be configured before running a migration', 'action-scheduler' ) );
+ }
+
+ return $this->source_store;
+ }
+
+ /**
+ * Set the configured source store.
+ *
+ * @param ActionScheduler_Store $store Source store object.
+ */
+ public function set_source_store( Store $store ) {
+ $this->source_store = $store;
+ }
+
+ /**
+ * Get the configured source loger.
+ *
+ * @return ActionScheduler_Logger
+ */
+ public function get_source_logger() {
+ if ( empty( $this->source_logger ) ) {
+ throw new \RuntimeException( __( 'Source logger must be configured before running a migration', 'action-scheduler' ) );
+ }
+
+ return $this->source_logger;
+ }
+
+ /**
+ * Set the configured source logger.
+ *
+ * @param ActionScheduler_Logger $logger
+ */
+ public function set_source_logger( Logger $logger ) {
+ $this->source_logger = $logger;
+ }
+
+ /**
+ * Get the configured destination store.
+ *
+ * @return ActionScheduler_Store
+ */
+ public function get_destination_store() {
+ if ( empty( $this->destination_store ) ) {
+ throw new \RuntimeException( __( 'Destination store must be configured before running a migration', 'action-scheduler' ) );
+ }
+
+ return $this->destination_store;
+ }
+
+ /**
+ * Set the configured destination store.
+ *
+ * @param ActionScheduler_Store $store
+ */
+ public function set_destination_store( Store $store ) {
+ $this->destination_store = $store;
+ }
+
+ /**
+ * Get the configured destination logger.
+ *
+ * @return ActionScheduler_Logger
+ */
+ public function get_destination_logger() {
+ if ( empty( $this->destination_logger ) ) {
+ throw new \RuntimeException( __( 'Destination logger must be configured before running a migration', 'action-scheduler' ) );
+ }
+
+ return $this->destination_logger;
+ }
+
+ /**
+ * Set the configured destination logger.
+ *
+ * @param ActionScheduler_Logger $logger
+ */
+ public function set_destination_logger( Logger $logger ) {
+ $this->destination_logger = $logger;
+ }
+
+ /**
+ * Get flag indicating whether it's a dry run.
+ *
+ * @return bool
+ */
+ public function get_dry_run() {
+ return $this->dry_run;
+ }
+
+ /**
+ * Set flag indicating whether it's a dry run.
+ *
+ * @param bool $dry_run
+ */
+ public function set_dry_run( $dry_run ) {
+ $this->dry_run = (bool) $dry_run;
+ }
+
+ /**
+ * Get progress bar object.
+ *
+ * @return ActionScheduler\WPCLI\ProgressBar
+ */
+ public function get_progress_bar() {
+ return $this->progress_bar;
+ }
+
+ /**
+ * Set progress bar object.
+ *
+ * @param ActionScheduler\WPCLI\ProgressBar $progress_bar
+ */
+ public function set_progress_bar( ProgressBar $progress_bar ) {
+ $this->progress_bar = $progress_bar;
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Controller.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Controller.php
new file mode 100644
index 00000000..fb282fb4
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Controller.php
@@ -0,0 +1,206 @@
+migration_scheduler = $migration_scheduler;
+ $this->store_classname = '';
+ }
+
+ /**
+ * Set the action store class name.
+ *
+ * @param string $class Classname of the store class.
+ *
+ * @return string
+ */
+ public function get_store_class( $class ) {
+ if ( \ActionScheduler_DataController::is_migration_complete() ) {
+ return \ActionScheduler_DataController::DATASTORE_CLASS;
+ } elseif ( \ActionScheduler_Store::DEFAULT_CLASS !== $class ) {
+ $this->store_classname = $class;
+ return $class;
+ } else {
+ return 'ActionScheduler_HybridStore';
+ }
+ }
+
+ /**
+ * Set the action logger class name.
+ *
+ * @param string $class Classname of the logger class.
+ *
+ * @return string
+ */
+ public function get_logger_class( $class ) {
+ \ActionScheduler_Store::instance();
+
+ if ( $this->has_custom_datastore() ) {
+ $this->logger_classname = $class;
+ return $class;
+ } else {
+ return \ActionScheduler_DataController::LOGGER_CLASS;
+ }
+ }
+
+ /**
+ * Get flag indicating whether a custom datastore is in use.
+ *
+ * @return bool
+ */
+ public function has_custom_datastore() {
+ return (bool) $this->store_classname;
+ }
+
+ /**
+ * Set up the background migration process
+ *
+ * @return void
+ */
+ public function schedule_migration() {
+ if ( \ActionScheduler_DataController::is_migration_complete() || $this->migration_scheduler->is_migration_scheduled() ) {
+ return;
+ }
+
+ $this->migration_scheduler->schedule_migration();
+ }
+
+ /**
+ * Get the default migration config object
+ *
+ * @return ActionScheduler\Migration\Config
+ */
+ public function get_migration_config_object() {
+ static $config = null;
+
+ if ( ! $config ) {
+ $source_store = $this->store_classname ? new $this->store_classname() : new \ActionScheduler_wpPostStore();
+ $source_logger = $this->logger_classname ? new $this->logger_classname() : new \ActionScheduler_wpCommentLogger();
+
+ $config = new Config();
+ $config->set_source_store( $source_store );
+ $config->set_source_logger( $source_logger );
+ $config->set_destination_store( new \ActionScheduler_DBStoreMigrator() );
+ $config->set_destination_logger( new \ActionScheduler_DBLogger() );
+
+ if ( defined( 'WP_CLI' ) && WP_CLI ) {
+ $config->set_progress_bar( new ProgressBar( '', 0 ) );
+ }
+ }
+
+ return apply_filters( 'action_scheduler/migration_config', $config );
+ }
+
+ /**
+ * Hook dashboard migration notice.
+ */
+ public function hook_admin_notices() {
+ if ( ! $this->allow_migration() || \ActionScheduler_DataController::is_migration_complete() ) {
+ return;
+ }
+ add_action( 'admin_notices', array( $this, 'display_migration_notice' ), 10, 0 );
+ }
+
+ /**
+ * Show a dashboard notice that migration is in progress.
+ */
+ public function display_migration_notice() {
+ printf( '
%s
', __( 'Action Scheduler migration in progress. The list of scheduled actions may be incomplete.', 'action-scheduler' ) );
+ }
+
+ /**
+ * Add store classes. Hook migration.
+ */
+ private function hook() {
+ add_filter( 'action_scheduler_store_class', array( $this, 'get_store_class' ), 100, 1 );
+ add_filter( 'action_scheduler_logger_class', array( $this, 'get_logger_class' ), 100, 1 );
+ add_action( 'init', array( $this, 'maybe_hook_migration' ) );
+ add_action( 'wp_loaded', array( $this, 'schedule_migration' ) );
+
+ // Action Scheduler may be displayed as a Tools screen or WooCommerce > Status administration screen
+ add_action( 'load-tools_page_action-scheduler', array( $this, 'hook_admin_notices' ), 10, 0 );
+ add_action( 'load-woocommerce_page_wc-status', array( $this, 'hook_admin_notices' ), 10, 0 );
+ }
+
+ /**
+ * Possibly hook the migration scheduler action.
+ *
+ * @author Jeremy Pry
+ */
+ public function maybe_hook_migration() {
+ if ( ! $this->allow_migration() || \ActionScheduler_DataController::is_migration_complete() ) {
+ return;
+ }
+
+ $this->migration_scheduler->hook();
+ }
+
+ /**
+ * Allow datastores to enable migration to AS tables.
+ */
+ public function allow_migration() {
+ if ( ! \ActionScheduler_DataController::dependencies_met() ) {
+ return false;
+ }
+
+ if ( null === $this->migrate_custom_store ) {
+ $this->migrate_custom_store = apply_filters( 'action_scheduler_migrate_data_store', false );
+ }
+
+ return ( ! $this->has_custom_datastore() ) || $this->migrate_custom_store;
+ }
+
+ /**
+ * Proceed with the migration if the dependencies have been met.
+ */
+ public static function init() {
+ if ( \ActionScheduler_DataController::dependencies_met() ) {
+ self::instance()->hook();
+ }
+ }
+
+ /**
+ * Singleton factory.
+ */
+ public static function instance() {
+ if ( ! isset( self::$instance ) ) {
+ self::$instance = new static( new Scheduler() );
+ }
+
+ return self::$instance;
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/DryRun_ActionMigrator.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/DryRun_ActionMigrator.php
new file mode 100644
index 00000000..ffc21c28
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/DryRun_ActionMigrator.php
@@ -0,0 +1,28 @@
+source = $source_logger;
+ $this->destination = $destination_Logger;
+ }
+
+ /**
+ * Migrate an action log.
+ *
+ * @param int $source_action_id Source logger object.
+ * @param int $destination_action_id Destination logger object.
+ */
+ public function migrate( $source_action_id, $destination_action_id ) {
+ $logs = $this->source->get_logs( $source_action_id );
+ foreach ( $logs as $log ) {
+ if ( $log->get_action_id() == $source_action_id ) {
+ $this->destination->log( $destination_action_id, $log->get_message(), $log->get_date() );
+ }
+ }
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Runner.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Runner.php
new file mode 100644
index 00000000..867c5de6
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Runner.php
@@ -0,0 +1,136 @@
+source_store = $config->get_source_store();
+ $this->destination_store = $config->get_destination_store();
+ $this->source_logger = $config->get_source_logger();
+ $this->destination_logger = $config->get_destination_logger();
+
+ $this->batch_fetcher = new BatchFetcher( $this->source_store );
+ if ( $config->get_dry_run() ) {
+ $this->log_migrator = new DryRun_LogMigrator( $this->source_logger, $this->destination_logger );
+ $this->action_migrator = new DryRun_ActionMigrator( $this->source_store, $this->destination_store, $this->log_migrator );
+ } else {
+ $this->log_migrator = new LogMigrator( $this->source_logger, $this->destination_logger );
+ $this->action_migrator = new ActionMigrator( $this->source_store, $this->destination_store, $this->log_migrator );
+ }
+
+ if ( defined( 'WP_CLI' ) && WP_CLI ) {
+ $this->progress_bar = $config->get_progress_bar();
+ }
+ }
+
+ /**
+ * Run migration batch.
+ *
+ * @param int $batch_size Optional batch size. Default 10.
+ *
+ * @return int Size of batch processed.
+ */
+ public function run( $batch_size = 10 ) {
+ $batch = $this->batch_fetcher->fetch( $batch_size );
+ $batch_size = count( $batch );
+
+ if ( ! $batch_size ) {
+ return 0;
+ }
+
+ if ( $this->progress_bar ) {
+ /* translators: %d: amount of actions */
+ $this->progress_bar->set_message( sprintf( _n( 'Migrating %d action', 'Migrating %d actions', $batch_size, 'action-scheduler' ), number_format_i18n( $batch_size ) ) );
+ $this->progress_bar->set_count( $batch_size );
+ }
+
+ $this->migrate_actions( $batch );
+
+ return $batch_size;
+ }
+
+ /**
+ * Migration a batch of actions.
+ *
+ * @param array $action_ids List of action IDs to migrate.
+ */
+ public function migrate_actions( array $action_ids ) {
+ do_action( 'action_scheduler/migration_batch_starting', $action_ids );
+
+ \ActionScheduler::logger()->unhook_stored_action();
+ $this->destination_logger->unhook_stored_action();
+
+ foreach ( $action_ids as $source_action_id ) {
+ $destination_action_id = $this->action_migrator->migrate( $source_action_id );
+ if ( $destination_action_id ) {
+ $this->destination_logger->log( $destination_action_id, sprintf(
+ /* translators: 1: source action ID 2: source store class 3: destination action ID 4: destination store class */
+ __( 'Migrated action with ID %1$d in %2$s to ID %3$d in %4$s', 'action-scheduler' ),
+ $source_action_id,
+ get_class( $this->source_store ),
+ $destination_action_id,
+ get_class( $this->destination_store )
+ ) );
+ }
+
+ if ( $this->progress_bar ) {
+ $this->progress_bar->tick();
+ }
+ }
+
+ if ( $this->progress_bar ) {
+ $this->progress_bar->finish();
+ }
+
+ \ActionScheduler::logger()->hook_stored_action();
+
+ do_action( 'action_scheduler/migration_batch_complete', $action_ids );
+ }
+
+ /**
+ * Initialize destination store and logger.
+ */
+ public function init_destination() {
+ $this->destination_store->init();
+ $this->destination_logger->init();
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Scheduler.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Scheduler.php
new file mode 100644
index 00000000..dcbe2db5
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/migration/Scheduler.php
@@ -0,0 +1,128 @@
+get_migration_runner();
+ $count = $migration_runner->run( $this->get_batch_size() );
+
+ if ( $count === 0 ) {
+ $this->mark_complete();
+ } else {
+ $this->schedule_migration( time() + $this->get_schedule_interval() );
+ }
+ }
+
+ /**
+ * Mark the migration complete.
+ */
+ public function mark_complete() {
+ $this->unschedule_migration();
+
+ \ActionScheduler_DataController::mark_migration_complete();
+ do_action( 'action_scheduler/migration_complete' );
+ }
+
+ /**
+ * Get a flag indicating whether the migration is scheduled.
+ *
+ * @return bool Whether there is a pending action in the store to handle the migration
+ */
+ public function is_migration_scheduled() {
+ $next = as_next_scheduled_action( self::HOOK );
+
+ return ! empty( $next );
+ }
+
+ /**
+ * Schedule the migration.
+ *
+ * @param int $when Optional timestamp to run the next migration batch. Defaults to now.
+ *
+ * @return string The action ID
+ */
+ public function schedule_migration( $when = 0 ) {
+ $next = as_next_scheduled_action( self::HOOK );
+
+ if ( ! empty( $next ) ) {
+ return $next;
+ }
+
+ if ( empty( $when ) ) {
+ $when = time() + MINUTE_IN_SECONDS;
+ }
+
+ return as_schedule_single_action( $when, self::HOOK, array(), self::GROUP );
+ }
+
+ /**
+ * Remove the scheduled migration action.
+ */
+ public function unschedule_migration() {
+ as_unschedule_action( self::HOOK, null, self::GROUP );
+ }
+
+ /**
+ * Get migration batch schedule interval.
+ *
+ * @return int Seconds between migration runs. Defaults to 0 seconds to allow chaining migration via Async Runners.
+ */
+ private function get_schedule_interval() {
+ return (int) apply_filters( 'action_scheduler/migration_interval', 0 );
+ }
+
+ /**
+ * Get migration batch size.
+ *
+ * @return int Number of actions to migrate in each batch. Defaults to 250.
+ */
+ private function get_batch_size() {
+ return (int) apply_filters( 'action_scheduler/migration_batch_size', 250 );
+ }
+
+ /**
+ * Get migration runner object.
+ *
+ * @return Runner
+ */
+ private function get_migration_runner() {
+ $config = Controller::instance()->get_migration_config_object();
+
+ return new Runner( $config );
+ }
+
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php
new file mode 100644
index 00000000..840e482c
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php
@@ -0,0 +1,57 @@
+__wakeup() for details.
+ **/
+ private $timestamp = NULL;
+
+ /**
+ * @param DateTime $after
+ *
+ * @return DateTime|null
+ */
+ public function calculate_next( DateTime $after ) {
+ return null;
+ }
+
+ /**
+ * Cancelled actions should never have a next schedule, even if get_next()
+ * is called with $after < $this->scheduled_date.
+ *
+ * @param DateTime $after
+ * @return DateTime|null
+ */
+ public function get_next( DateTime $after ) {
+ return null;
+ }
+
+ /**
+ * @return bool
+ */
+ public function is_recurring() {
+ return false;
+ }
+
+ /**
+ * Unserialize recurring schedules serialized/stored prior to AS 3.0.0
+ *
+ * Prior to Action Scheduler 3.0.0, schedules used different property names to refer
+ * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
+ * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0
+ * aligned properties and property names for better inheritance. To maintain backward
+ * compatibility with schedules serialized and stored prior to 3.0, we need to correctly
+ * map the old property names with matching visibility.
+ */
+ public function __wakeup() {
+ if ( ! is_null( $this->timestamp ) ) {
+ $this->scheduled_timestamp = $this->timestamp;
+ unset( $this->timestamp );
+ }
+ parent::__wakeup();
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php
new file mode 100644
index 00000000..7859307a
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_CronSchedule.php
@@ -0,0 +1,102 @@
+__wakeup() for details.
+ **/
+ private $start_timestamp = NULL;
+
+ /**
+ * Deprecated property @see $this->__wakeup() for details.
+ **/
+ private $cron = NULL;
+
+ /**
+ * Wrapper for parent constructor to accept a cron expression string and map it to a CronExpression for this
+ * objects $recurrence property.
+ *
+ * @param DateTime $start The date & time to run the action at or after. If $start aligns with the CronSchedule passed via $recurrence, it will be used. If it does not align, the first matching date after it will be used.
+ * @param CronExpression|string $recurrence The CronExpression used to calculate the schedule's next instance.
+ * @param DateTime|null $first (Optional) The date & time the first instance of this interval schedule ran. Default null, meaning this is the first instance.
+ */
+ public function __construct( DateTime $start, $recurrence, DateTime $first = null ) {
+ if ( ! is_a( $recurrence, 'CronExpression' ) ) {
+ $recurrence = CronExpression::factory( $recurrence );
+ }
+
+ // For backward compatibility, we need to make sure the date is set to the first matching cron date, not whatever date is passed in. Importantly, by passing true as the 3rd param, if $start matches the cron expression, then it will be used. This was previously handled in the now deprecated next() method.
+ $date = $recurrence->getNextRunDate( $start, 0, true );
+
+ // parent::__construct() will set this to $date by default, but that may be different to $start now.
+ $first = empty( $first ) ? $start : $first;
+
+ parent::__construct( $date, $recurrence, $first );
+ }
+
+ /**
+ * Calculate when an instance of this schedule would start based on a given
+ * date & time using its the CronExpression.
+ *
+ * @param DateTime $after
+ * @return DateTime
+ */
+ protected function calculate_next( DateTime $after ) {
+ return $this->recurrence->getNextRunDate( $after, 0, false );
+ }
+
+ /**
+ * @return string
+ */
+ public function get_recurrence() {
+ return strval( $this->recurrence );
+ }
+
+ /**
+ * Serialize cron schedules with data required prior to AS 3.0.0
+ *
+ * Prior to Action Scheduler 3.0.0, reccuring schedules used different property names to
+ * refer to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
+ * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0
+ * aligned properties and property names for better inheritance. To guard against the
+ * possibility of infinite loops if downgrading to Action Scheduler < 3.0.0, we need to
+ * also store the data with the old property names so if it's unserialized in AS < 3.0,
+ * the schedule doesn't end up with a null recurrence.
+ *
+ * @return array
+ */
+ public function __sleep() {
+
+ $sleep_params = parent::__sleep();
+
+ $this->start_timestamp = $this->scheduled_timestamp;
+ $this->cron = $this->recurrence;
+
+ return array_merge( $sleep_params, array(
+ 'start_timestamp',
+ 'cron'
+ ) );
+ }
+
+ /**
+ * Unserialize cron schedules serialized/stored prior to AS 3.0.0
+ *
+ * For more background, @see ActionScheduler_Abstract_RecurringSchedule::__wakeup().
+ */
+ public function __wakeup() {
+ if ( is_null( $this->scheduled_timestamp ) && ! is_null( $this->start_timestamp ) ) {
+ $this->scheduled_timestamp = $this->start_timestamp;
+ unset( $this->start_timestamp );
+ }
+
+ if ( is_null( $this->recurrence ) && ! is_null( $this->cron ) ) {
+ $this->recurrence = $this->cron;
+ unset( $this->cron );
+ }
+ parent::__wakeup();
+ }
+}
+
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_IntervalSchedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_IntervalSchedule.php
new file mode 100644
index 00000000..11a591e8
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_IntervalSchedule.php
@@ -0,0 +1,81 @@
+__wakeup() for details.
+ **/
+ private $start_timestamp = NULL;
+
+ /**
+ * Deprecated property @see $this->__wakeup() for details.
+ **/
+ private $interval_in_seconds = NULL;
+
+ /**
+ * Calculate when this schedule should start after a given date & time using
+ * the number of seconds between recurrences.
+ *
+ * @param DateTime $after
+ * @return DateTime
+ */
+ protected function calculate_next( DateTime $after ) {
+ $after->modify( '+' . (int) $this->get_recurrence() . ' seconds' );
+ return $after;
+ }
+
+ /**
+ * @return int
+ */
+ public function interval_in_seconds() {
+ _deprecated_function( __METHOD__, '3.0.0', '(int)ActionScheduler_Abstract_RecurringSchedule::get_recurrence()' );
+ return (int) $this->get_recurrence();
+ }
+
+ /**
+ * Serialize interval schedules with data required prior to AS 3.0.0
+ *
+ * Prior to Action Scheduler 3.0.0, reccuring schedules used different property names to
+ * refer to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
+ * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0
+ * aligned properties and property names for better inheritance. To guard against the
+ * possibility of infinite loops if downgrading to Action Scheduler < 3.0.0, we need to
+ * also store the data with the old property names so if it's unserialized in AS < 3.0,
+ * the schedule doesn't end up with a null/false/0 recurrence.
+ *
+ * @return array
+ */
+ public function __sleep() {
+
+ $sleep_params = parent::__sleep();
+
+ $this->start_timestamp = $this->scheduled_timestamp;
+ $this->interval_in_seconds = $this->recurrence;
+
+ return array_merge( $sleep_params, array(
+ 'start_timestamp',
+ 'interval_in_seconds'
+ ) );
+ }
+
+ /**
+ * Unserialize interval schedules serialized/stored prior to AS 3.0.0
+ *
+ * For more background, @see ActionScheduler_Abstract_RecurringSchedule::__wakeup().
+ */
+ public function __wakeup() {
+ if ( is_null( $this->scheduled_timestamp ) && ! is_null( $this->start_timestamp ) ) {
+ $this->scheduled_timestamp = $this->start_timestamp;
+ unset( $this->start_timestamp );
+ }
+
+ if ( is_null( $this->recurrence ) && ! is_null( $this->interval_in_seconds ) ) {
+ $this->recurrence = $this->interval_in_seconds;
+ unset( $this->interval_in_seconds );
+ }
+ parent::__wakeup();
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_NullSchedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_NullSchedule.php
new file mode 100644
index 00000000..0ca9f7ca
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_NullSchedule.php
@@ -0,0 +1,28 @@
+scheduled_date = null;
+ }
+
+ /**
+ * This schedule has no scheduled DateTime, so we need to override the parent __sleep()
+ * @return array
+ */
+ public function __sleep() {
+ return array();
+ }
+
+ public function __wakeup() {
+ $this->scheduled_date = null;
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_Schedule.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_Schedule.php
new file mode 100644
index 00000000..d61a9f7c
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schedules/ActionScheduler_Schedule.php
@@ -0,0 +1,18 @@
+__wakeup() for details.
+ **/
+ private $timestamp = NULL;
+
+ /**
+ * @param DateTime $after
+ *
+ * @return DateTime|null
+ */
+ public function calculate_next( DateTime $after ) {
+ return null;
+ }
+
+ /**
+ * @return bool
+ */
+ public function is_recurring() {
+ return false;
+ }
+
+ /**
+ * Serialize schedule with data required prior to AS 3.0.0
+ *
+ * Prior to Action Scheduler 3.0.0, schedules used different property names to refer
+ * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
+ * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0
+ * aligned properties and property names for better inheritance. To guard against the
+ * scheduled date for single actions always being seen as "now" if downgrading to
+ * Action Scheduler < 3.0.0, we need to also store the data with the old property names
+ * so if it's unserialized in AS < 3.0, the schedule doesn't end up with a null recurrence.
+ *
+ * @return array
+ */
+ public function __sleep() {
+
+ $sleep_params = parent::__sleep();
+
+ $this->timestamp = $this->scheduled_timestamp;
+
+ return array_merge( $sleep_params, array(
+ 'timestamp',
+ ) );
+ }
+
+ /**
+ * Unserialize recurring schedules serialized/stored prior to AS 3.0.0
+ *
+ * Prior to Action Scheduler 3.0.0, schedules used different property names to refer
+ * to equivalent data. For example, ActionScheduler_IntervalSchedule::start_timestamp
+ * was the same as ActionScheduler_SimpleSchedule::timestamp. Action Scheduler 3.0.0
+ * aligned properties and property names for better inheritance. To maintain backward
+ * compatibility with schedules serialized and stored prior to 3.0, we need to correctly
+ * map the old property names with matching visibility.
+ */
+ public function __wakeup() {
+
+ if ( is_null( $this->scheduled_timestamp ) && ! is_null( $this->timestamp ) ) {
+ $this->scheduled_timestamp = $this->timestamp;
+ unset( $this->timestamp );
+ }
+ parent::__wakeup();
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php
new file mode 100644
index 00000000..0db5fbd7
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php
@@ -0,0 +1,47 @@
+tables = [
+ self::LOG_TABLE,
+ ];
+ }
+
+ protected function get_table_definition( $table ) {
+ global $wpdb;
+ $table_name = $wpdb->$table;
+ $charset_collate = $wpdb->get_charset_collate();
+ switch ( $table ) {
+
+ case self::LOG_TABLE:
+
+ return "CREATE TABLE {$table_name} (
+ log_id bigint(20) unsigned NOT NULL auto_increment,
+ action_id bigint(20) unsigned NOT NULL,
+ message text NOT NULL,
+ log_date_gmt datetime NOT NULL default '0000-00-00 00:00:00',
+ log_date_local datetime NOT NULL default '0000-00-00 00:00:00',
+ PRIMARY KEY (log_id),
+ KEY action_id (action_id),
+ KEY log_date_gmt (log_date_gmt)
+ ) $charset_collate";
+
+ default:
+ return '';
+ }
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php
new file mode 100644
index 00000000..c36783ca
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php
@@ -0,0 +1,83 @@
+tables = [
+ self::ACTIONS_TABLE,
+ self::CLAIMS_TABLE,
+ self::GROUPS_TABLE,
+ ];
+ }
+
+ protected function get_table_definition( $table ) {
+ global $wpdb;
+ $table_name = $wpdb->$table;
+ $charset_collate = $wpdb->get_charset_collate();
+ $max_index_length = 191; // @see wp_get_db_schema()
+ switch ( $table ) {
+
+ case self::ACTIONS_TABLE:
+
+ return "CREATE TABLE {$table_name} (
+ action_id bigint(20) unsigned NOT NULL auto_increment,
+ hook varchar(191) NOT NULL,
+ status varchar(20) NOT NULL,
+ scheduled_date_gmt datetime NOT NULL default '0000-00-00 00:00:00',
+ scheduled_date_local datetime NOT NULL default '0000-00-00 00:00:00',
+ args varchar($max_index_length),
+ schedule longtext,
+ group_id bigint(20) unsigned NOT NULL default '0',
+ attempts int(11) NOT NULL default '0',
+ last_attempt_gmt datetime NOT NULL default '0000-00-00 00:00:00',
+ last_attempt_local datetime NOT NULL default '0000-00-00 00:00:00',
+ claim_id bigint(20) unsigned NOT NULL default '0',
+ extended_args varchar(8000) DEFAULT NULL,
+ PRIMARY KEY (action_id),
+ KEY hook (hook($max_index_length)),
+ KEY status (status),
+ KEY scheduled_date_gmt (scheduled_date_gmt),
+ KEY args (args($max_index_length)),
+ KEY group_id (group_id),
+ KEY last_attempt_gmt (last_attempt_gmt),
+ KEY claim_id (claim_id)
+ ) $charset_collate";
+
+ case self::CLAIMS_TABLE:
+
+ return "CREATE TABLE {$table_name} (
+ claim_id bigint(20) unsigned NOT NULL auto_increment,
+ date_created_gmt datetime NOT NULL default '0000-00-00 00:00:00',
+ PRIMARY KEY (claim_id),
+ KEY date_created_gmt (date_created_gmt)
+ ) $charset_collate";
+
+ case self::GROUPS_TABLE:
+
+ return "CREATE TABLE {$table_name} (
+ group_id bigint(20) unsigned NOT NULL auto_increment,
+ slug varchar(255) NOT NULL,
+ PRIMARY KEY (group_id),
+ KEY slug (slug($max_index_length))
+ ) $charset_collate";
+
+ default:
+ return '';
+ }
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Abstract_QueueRunner_Deprecated.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Abstract_QueueRunner_Deprecated.php
new file mode 100644
index 00000000..dac17aa4
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Abstract_QueueRunner_Deprecated.php
@@ -0,0 +1,27 @@
+get_date();
+ $replacement_method = 'get_date()';
+ } else {
+ $return_value = $this->get_next( $after );
+ $replacement_method = 'get_next( $after )';
+ }
+
+ _deprecated_function( __METHOD__, '3.0.0', __CLASS__ . '::' . $replacement_method );
+
+ return $return_value;
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Store_Deprecated.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Store_Deprecated.php
new file mode 100644
index 00000000..002dc75b
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/ActionScheduler_Store_Deprecated.php
@@ -0,0 +1,49 @@
+mark_failure( $action_id );
+ }
+
+ /**
+ * Add base hooks
+ *
+ * @since 2.2.6
+ */
+ protected static function hook() {
+ _deprecated_function( __METHOD__, '3.0.0' );
+ }
+
+ /**
+ * Remove base hooks
+ *
+ * @since 2.2.6
+ */
+ protected static function unhook() {
+ _deprecated_function( __METHOD__, '3.0.0' );
+ }
+
+ /**
+ * Get the site's local time.
+ *
+ * @deprecated 2.1.0
+ * @return DateTimeZone
+ */
+ protected function get_local_timezone() {
+ _deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' );
+ return ActionScheduler_TimezoneHelper::get_local_timezone();
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/functions.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/functions.php
new file mode 100644
index 00000000..f782c4b7
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/deprecated/functions.php
@@ -0,0 +1,126 @@
+ '' - the name of the action that will be triggered
+ * 'args' => NULL - the args array that will be passed with the action
+ * 'date' => NULL - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone.
+ * 'date_compare' => '<=' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '='
+ * 'modified' => NULL - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone.
+ * 'modified_compare' => '<=' - operator for testing "modified". accepted values are '!=', '>', '>=', '<', '<=', '='
+ * 'group' => '' - the group the action belongs to
+ * 'status' => '' - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING
+ * 'claimed' => NULL - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID
+ * 'per_page' => 5 - Number of results to return
+ * 'offset' => 0
+ * 'orderby' => 'date' - accepted values are 'hook', 'group', 'modified', or 'date'
+ * 'order' => 'ASC'
+ * @param string $return_format OBJECT, ARRAY_A, or ids
+ *
+ * @deprecated 2.1.0
+ *
+ * @return array
+ */
+function wc_get_scheduled_actions( $args = array(), $return_format = OBJECT ) {
+ _deprecated_function( __FUNCTION__, '2.1.0', 'as_get_scheduled_actions()' );
+ return as_get_scheduled_actions( $args, $return_format );
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/functions.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/functions.php
new file mode 100644
index 00000000..241c387d
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/functions.php
@@ -0,0 +1,275 @@
+async( $hook, $args, $group );
+}
+
+/**
+ * Schedule an action to run one time
+ *
+ * @param int $timestamp When the job will run.
+ * @param string $hook The hook to trigger.
+ * @param array $args Arguments to pass when the hook triggers.
+ * @param string $group The group to assign this job to.
+ *
+ * @return int The action ID.
+ */
+function as_schedule_single_action( $timestamp, $hook, $args = array(), $group = '' ) {
+ if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
+ return 0;
+ }
+ return ActionScheduler::factory()->single( $hook, $args, $timestamp, $group );
+}
+
+/**
+ * Schedule a recurring action
+ *
+ * @param int $timestamp When the first instance of the job will run.
+ * @param int $interval_in_seconds How long to wait between runs.
+ * @param string $hook The hook to trigger.
+ * @param array $args Arguments to pass when the hook triggers.
+ * @param string $group The group to assign this job to.
+ *
+ * @return int The action ID.
+ */
+function as_schedule_recurring_action( $timestamp, $interval_in_seconds, $hook, $args = array(), $group = '' ) {
+ if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
+ return 0;
+ }
+ return ActionScheduler::factory()->recurring( $hook, $args, $timestamp, $interval_in_seconds, $group );
+}
+
+/**
+ * Schedule an action that recurs on a cron-like schedule.
+ *
+ * @param int $base_timestamp The first instance of the action will be scheduled
+ * to run at a time calculated after this timestamp matching the cron
+ * expression. This can be used to delay the first instance of the action.
+ * @param string $schedule A cron-link schedule string
+ * @see http://en.wikipedia.org/wiki/Cron
+ * * * * * * *
+ * ┬ ┬ ┬ ┬ ┬ ┬
+ * | | | | | |
+ * | | | | | + year [optional]
+ * | | | | +----- day of week (0 - 7) (Sunday=0 or 7)
+ * | | | +---------- month (1 - 12)
+ * | | +--------------- day of month (1 - 31)
+ * | +-------------------- hour (0 - 23)
+ * +------------------------- min (0 - 59)
+ * @param string $hook The hook to trigger.
+ * @param array $args Arguments to pass when the hook triggers.
+ * @param string $group The group to assign this job to.
+ *
+ * @return int The action ID.
+ */
+function as_schedule_cron_action( $timestamp, $schedule, $hook, $args = array(), $group = '' ) {
+ if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
+ return 0;
+ }
+ return ActionScheduler::factory()->cron( $hook, $args, $timestamp, $schedule, $group );
+}
+
+/**
+ * Cancel the next occurrence of a scheduled action.
+ *
+ * While only the next instance of a recurring or cron action is unscheduled by this method, that will also prevent
+ * all future instances of that recurring or cron action from being run. Recurring and cron actions are scheduled in
+ * a sequence instead of all being scheduled at once. Each successive occurrence of a recurring action is scheduled
+ * only after the former action is run. If the next instance is never run, because it's unscheduled by this function,
+ * then the following instance will never be scheduled (or exist), which is effectively the same as being unscheduled
+ * by this method also.
+ *
+ * @param string $hook The hook that the job will trigger.
+ * @param array $args Args that would have been passed to the job.
+ * @param string $group The group the job is assigned to.
+ *
+ * @return string|null The scheduled action ID if a scheduled action was found, or null if no matching action found.
+ */
+function as_unschedule_action( $hook, $args = array(), $group = '' ) {
+ if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
+ return 0;
+ }
+ $params = array();
+ if ( is_array($args) ) {
+ $params['args'] = $args;
+ }
+ if ( !empty($group) ) {
+ $params['group'] = $group;
+ }
+ $job_id = ActionScheduler::store()->find_action( $hook, $params );
+
+ if ( ! empty( $job_id ) ) {
+ ActionScheduler::store()->cancel_action( $job_id );
+ }
+
+ return $job_id;
+}
+
+/**
+ * Cancel all occurrences of a scheduled action.
+ *
+ * @param string $hook The hook that the job will trigger.
+ * @param array $args Args that would have been passed to the job.
+ * @param string $group The group the job is assigned to.
+ */
+function as_unschedule_all_actions( $hook, $args = array(), $group = '' ) {
+ if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
+ return;
+ }
+ if ( empty( $args ) ) {
+ if ( ! empty( $hook ) && empty( $group ) ) {
+ ActionScheduler_Store::instance()->cancel_actions_by_hook( $hook );
+ return;
+ }
+ if ( ! empty( $group ) && empty( $hook ) ) {
+ ActionScheduler_Store::instance()->cancel_actions_by_group( $group );
+ return;
+ }
+ }
+ do {
+ $unscheduled_action = as_unschedule_action( $hook, $args, $group );
+ } while ( ! empty( $unscheduled_action ) );
+}
+
+/**
+ * Check if there is an existing action in the queue with a given hook, args and group combination.
+ *
+ * An action in the queue could be pending, in-progress or async. If the is pending for a time in
+ * future, its scheduled date will be returned as a timestamp. If it is currently being run, or an
+ * async action sitting in the queue waiting to be processed, in which case boolean true will be
+ * returned. Or there may be no async, in-progress or pending action for this hook, in which case,
+ * boolean false will be the return value.
+ *
+ * @param string $hook
+ * @param array $args
+ * @param string $group
+ *
+ * @return int|bool The timestamp for the next occurrence of a pending scheduled action, true for an async or in-progress action or false if there is no matching action.
+ */
+function as_next_scheduled_action( $hook, $args = NULL, $group = '' ) {
+ if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
+ return false;
+ }
+ $params = array();
+ if ( is_array($args) ) {
+ $params['args'] = $args;
+ }
+ if ( !empty($group) ) {
+ $params['group'] = $group;
+ }
+
+ $params['status'] = ActionScheduler_Store::STATUS_RUNNING;
+ $job_id = ActionScheduler::store()->find_action( $hook, $params );
+ if ( ! empty( $job_id ) ) {
+ return true;
+ }
+
+ $params['status'] = ActionScheduler_Store::STATUS_PENDING;
+ $job_id = ActionScheduler::store()->find_action( $hook, $params );
+ if ( empty($job_id) ) {
+ return false;
+ }
+ $job = ActionScheduler::store()->fetch_action( $job_id );
+ $scheduled_date = $job->get_schedule()->get_date();
+ if ( $scheduled_date ) {
+ return (int) $scheduled_date->format( 'U' );
+ } elseif ( NULL === $scheduled_date ) { // pending async action with NullSchedule
+ return true;
+ }
+ return false;
+}
+
+/**
+ * Find scheduled actions
+ *
+ * @param array $args Possible arguments, with their default values:
+ * 'hook' => '' - the name of the action that will be triggered
+ * 'args' => NULL - the args array that will be passed with the action
+ * 'date' => NULL - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone.
+ * 'date_compare' => '<=' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '='
+ * 'modified' => NULL - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone.
+ * 'modified_compare' => '<=' - operator for testing "modified". accepted values are '!=', '>', '>=', '<', '<=', '='
+ * 'group' => '' - the group the action belongs to
+ * 'status' => '' - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING
+ * 'claimed' => NULL - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID
+ * 'per_page' => 5 - Number of results to return
+ * 'offset' => 0
+ * 'orderby' => 'date' - accepted values are 'hook', 'group', 'modified', or 'date'
+ * 'order' => 'ASC'
+ *
+ * @param string $return_format OBJECT, ARRAY_A, or ids.
+ *
+ * @return array
+ */
+function as_get_scheduled_actions( $args = array(), $return_format = OBJECT ) {
+ if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) {
+ return array();
+ }
+ $store = ActionScheduler::store();
+ foreach ( array('date', 'modified') as $key ) {
+ if ( isset($args[$key]) ) {
+ $args[$key] = as_get_datetime_object($args[$key]);
+ }
+ }
+ $ids = $store->query_actions( $args );
+
+ if ( $return_format == 'ids' || $return_format == 'int' ) {
+ return $ids;
+ }
+
+ $actions = array();
+ foreach ( $ids as $action_id ) {
+ $actions[$action_id] = $store->fetch_action( $action_id );
+ }
+
+ if ( $return_format == ARRAY_A ) {
+ foreach ( $actions as $action_id => $action_object ) {
+ $actions[$action_id] = get_object_vars($action_object);
+ }
+ }
+
+ return $actions;
+}
+
+/**
+ * Helper function to create an instance of DateTime based on a given
+ * string and timezone. By default, will return the current date/time
+ * in the UTC timezone.
+ *
+ * Needed because new DateTime() called without an explicit timezone
+ * will create a date/time in PHP's timezone, but we need to have
+ * assurance that a date/time uses the right timezone (which we almost
+ * always want to be UTC), which means we need to always include the
+ * timezone when instantiating datetimes rather than leaving it up to
+ * the PHP default.
+ *
+ * @param mixed $date_string A date/time string. Valid formats are explained in http://php.net/manual/en/datetime.formats.php.
+ * @param string $timezone A timezone identifier, like UTC or Europe/Lisbon. The list of valid identifiers is available http://php.net/manual/en/timezones.php.
+ *
+ * @return ActionScheduler_DateTime
+ */
+function as_get_datetime_object( $date_string = null, $timezone = 'UTC' ) {
+ if ( is_object( $date_string ) && $date_string instanceof DateTime ) {
+ $date = new ActionScheduler_DateTime( $date_string->format( 'Y-m-d H:i:s' ), new DateTimeZone( $timezone ) );
+ } elseif ( is_numeric( $date_string ) ) {
+ $date = new ActionScheduler_DateTime( '@' . $date_string, new DateTimeZone( $timezone ) );
+ } else {
+ $date = new ActionScheduler_DateTime( $date_string, new DateTimeZone( $timezone ) );
+ }
+ return $date;
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/WP_Async_Request.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/WP_Async_Request.php
new file mode 100644
index 00000000..d7dea1c2
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/WP_Async_Request.php
@@ -0,0 +1,170 @@
+identifier = $this->prefix . '_' . $this->action;
+
+ add_action( 'wp_ajax_' . $this->identifier, array( $this, 'maybe_handle' ) );
+ add_action( 'wp_ajax_nopriv_' . $this->identifier, array( $this, 'maybe_handle' ) );
+ }
+
+ /**
+ * Set data used during the request
+ *
+ * @param array $data Data.
+ *
+ * @return $this
+ */
+ public function data( $data ) {
+ $this->data = $data;
+
+ return $this;
+ }
+
+ /**
+ * Dispatch the async request
+ *
+ * @return array|WP_Error
+ */
+ public function dispatch() {
+ $url = add_query_arg( $this->get_query_args(), $this->get_query_url() );
+ $args = $this->get_post_args();
+
+ return wp_remote_post( esc_url_raw( $url ), $args );
+ }
+
+ /**
+ * Get query args
+ *
+ * @return array
+ */
+ protected function get_query_args() {
+ if ( property_exists( $this, 'query_args' ) ) {
+ return $this->query_args;
+ }
+
+ return array(
+ 'action' => $this->identifier,
+ 'nonce' => wp_create_nonce( $this->identifier ),
+ );
+ }
+
+ /**
+ * Get query URL
+ *
+ * @return string
+ */
+ protected function get_query_url() {
+ if ( property_exists( $this, 'query_url' ) ) {
+ return $this->query_url;
+ }
+
+ return admin_url( 'admin-ajax.php' );
+ }
+
+ /**
+ * Get post args
+ *
+ * @return array
+ */
+ protected function get_post_args() {
+ if ( property_exists( $this, 'post_args' ) ) {
+ return $this->post_args;
+ }
+
+ return array(
+ 'timeout' => 0.01,
+ 'blocking' => false,
+ 'body' => $this->data,
+ 'cookies' => $_COOKIE,
+ 'sslverify' => apply_filters( 'https_local_ssl_verify', false ),
+ );
+ }
+
+ /**
+ * Maybe handle
+ *
+ * Check for correct nonce and pass to handler.
+ */
+ public function maybe_handle() {
+ // Don't lock up other requests while processing
+ session_write_close();
+
+ check_ajax_referer( $this->identifier, 'nonce' );
+
+ $this->handle();
+
+ wp_die();
+ }
+
+ /**
+ * Handle
+ *
+ * Override this method to perform any actions required
+ * during the async request.
+ */
+ abstract protected function handle();
+
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression.php
new file mode 100644
index 00000000..7f33c378
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression.php
@@ -0,0 +1,318 @@
+
+ * @link http://en.wikipedia.org/wiki/Cron
+ */
+class CronExpression
+{
+ const MINUTE = 0;
+ const HOUR = 1;
+ const DAY = 2;
+ const MONTH = 3;
+ const WEEKDAY = 4;
+ const YEAR = 5;
+
+ /**
+ * @var array CRON expression parts
+ */
+ private $cronParts;
+
+ /**
+ * @var CronExpression_FieldFactory CRON field factory
+ */
+ private $fieldFactory;
+
+ /**
+ * @var array Order in which to test of cron parts
+ */
+ private static $order = array(self::YEAR, self::MONTH, self::DAY, self::WEEKDAY, self::HOUR, self::MINUTE);
+
+ /**
+ * Factory method to create a new CronExpression.
+ *
+ * @param string $expression The CRON expression to create. There are
+ * several special predefined values which can be used to substitute the
+ * CRON expression:
+ *
+ * @yearly, @annually) - Run once a year, midnight, Jan. 1 - 0 0 1 1 *
+ * @monthly - Run once a month, midnight, first of month - 0 0 1 * *
+ * @weekly - Run once a week, midnight on Sun - 0 0 * * 0
+ * @daily - Run once a day, midnight - 0 0 * * *
+ * @hourly - Run once an hour, first minute - 0 * * * *
+ *
+*@param CronExpression_FieldFactory $fieldFactory (optional) Field factory to use
+ *
+ * @return CronExpression
+ */
+ public static function factory($expression, CronExpression_FieldFactory $fieldFactory = null)
+ {
+ $mappings = array(
+ '@yearly' => '0 0 1 1 *',
+ '@annually' => '0 0 1 1 *',
+ '@monthly' => '0 0 1 * *',
+ '@weekly' => '0 0 * * 0',
+ '@daily' => '0 0 * * *',
+ '@hourly' => '0 * * * *'
+ );
+
+ if (isset($mappings[$expression])) {
+ $expression = $mappings[$expression];
+ }
+
+ return new self($expression, $fieldFactory ? $fieldFactory : new CronExpression_FieldFactory());
+ }
+
+ /**
+ * Parse a CRON expression
+ *
+ * @param string $expression CRON expression (e.g. '8 * * * *')
+ * @param CronExpression_FieldFactory $fieldFactory Factory to create cron fields
+ */
+ public function __construct($expression, CronExpression_FieldFactory $fieldFactory)
+ {
+ $this->fieldFactory = $fieldFactory;
+ $this->setExpression($expression);
+ }
+
+ /**
+ * Set or change the CRON expression
+ *
+ * @param string $value CRON expression (e.g. 8 * * * *)
+ *
+ * @return CronExpression
+ * @throws InvalidArgumentException if not a valid CRON expression
+ */
+ public function setExpression($value)
+ {
+ $this->cronParts = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY);
+ if (count($this->cronParts) < 5) {
+ throw new InvalidArgumentException(
+ $value . ' is not a valid CRON expression'
+ );
+ }
+
+ foreach ($this->cronParts as $position => $part) {
+ $this->setPart($position, $part);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Set part of the CRON expression
+ *
+ * @param int $position The position of the CRON expression to set
+ * @param string $value The value to set
+ *
+ * @return CronExpression
+ * @throws InvalidArgumentException if the value is not valid for the part
+ */
+ public function setPart($position, $value)
+ {
+ if (!$this->fieldFactory->getField($position)->validate($value)) {
+ throw new InvalidArgumentException(
+ 'Invalid CRON field value ' . $value . ' as position ' . $position
+ );
+ }
+
+ $this->cronParts[$position] = $value;
+
+ return $this;
+ }
+
+ /**
+ * Get a next run date relative to the current date or a specific date
+ *
+ * @param string|DateTime $currentTime (optional) Relative calculation date
+ * @param int $nth (optional) Number of matches to skip before returning a
+ * matching next run date. 0, the default, will return the current
+ * date and time if the next run date falls on the current date and
+ * time. Setting this value to 1 will skip the first match and go to
+ * the second match. Setting this value to 2 will skip the first 2
+ * matches and so on.
+ * @param bool $allowCurrentDate (optional) Set to TRUE to return the
+ * current date if it matches the cron expression
+ *
+ * @return DateTime
+ * @throws RuntimeException on too many iterations
+ */
+ public function getNextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false)
+ {
+ return $this->getRunDate($currentTime, $nth, false, $allowCurrentDate);
+ }
+
+ /**
+ * Get a previous run date relative to the current date or a specific date
+ *
+ * @param string|DateTime $currentTime (optional) Relative calculation date
+ * @param int $nth (optional) Number of matches to skip before returning
+ * @param bool $allowCurrentDate (optional) Set to TRUE to return the
+ * current date if it matches the cron expression
+ *
+ * @return DateTime
+ * @throws RuntimeException on too many iterations
+ * @see CronExpression::getNextRunDate
+ */
+ public function getPreviousRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false)
+ {
+ return $this->getRunDate($currentTime, $nth, true, $allowCurrentDate);
+ }
+
+ /**
+ * Get multiple run dates starting at the current date or a specific date
+ *
+ * @param int $total Set the total number of dates to calculate
+ * @param string|DateTime $currentTime (optional) Relative calculation date
+ * @param bool $invert (optional) Set to TRUE to retrieve previous dates
+ * @param bool $allowCurrentDate (optional) Set to TRUE to return the
+ * current date if it matches the cron expression
+ *
+ * @return array Returns an array of run dates
+ */
+ public function getMultipleRunDates($total, $currentTime = 'now', $invert = false, $allowCurrentDate = false)
+ {
+ $matches = array();
+ for ($i = 0; $i < max(0, $total); $i++) {
+ $matches[] = $this->getRunDate($currentTime, $i, $invert, $allowCurrentDate);
+ }
+
+ return $matches;
+ }
+
+ /**
+ * Get all or part of the CRON expression
+ *
+ * @param string $part (optional) Specify the part to retrieve or NULL to
+ * get the full cron schedule string.
+ *
+ * @return string|null Returns the CRON expression, a part of the
+ * CRON expression, or NULL if the part was specified but not found
+ */
+ public function getExpression($part = null)
+ {
+ if (null === $part) {
+ return implode(' ', $this->cronParts);
+ } elseif (array_key_exists($part, $this->cronParts)) {
+ return $this->cronParts[$part];
+ }
+
+ return null;
+ }
+
+ /**
+ * Helper method to output the full expression.
+ *
+ * @return string Full CRON expression
+ */
+ public function __toString()
+ {
+ return $this->getExpression();
+ }
+
+ /**
+ * Determine if the cron is due to run based on the current date or a
+ * specific date. This method assumes that the current number of
+ * seconds are irrelevant, and should be called once per minute.
+ *
+ * @param string|DateTime $currentTime (optional) Relative calculation date
+ *
+ * @return bool Returns TRUE if the cron is due to run or FALSE if not
+ */
+ public function isDue($currentTime = 'now')
+ {
+ if ('now' === $currentTime) {
+ $currentDate = date('Y-m-d H:i');
+ $currentTime = strtotime($currentDate);
+ } elseif ($currentTime instanceof DateTime) {
+ $currentDate = $currentTime->format('Y-m-d H:i');
+ $currentTime = strtotime($currentDate);
+ } else {
+ $currentTime = new DateTime($currentTime);
+ $currentTime->setTime($currentTime->format('H'), $currentTime->format('i'), 0);
+ $currentDate = $currentTime->format('Y-m-d H:i');
+ $currentTime = (int)($currentTime->getTimestamp());
+ }
+
+ return $this->getNextRunDate($currentDate, 0, true)->getTimestamp() == $currentTime;
+ }
+
+ /**
+ * Get the next or previous run date of the expression relative to a date
+ *
+ * @param string|DateTime $currentTime (optional) Relative calculation date
+ * @param int $nth (optional) Number of matches to skip before returning
+ * @param bool $invert (optional) Set to TRUE to go backwards in time
+ * @param bool $allowCurrentDate (optional) Set to TRUE to return the
+ * current date if it matches the cron expression
+ *
+ * @return DateTime
+ * @throws RuntimeException on too many iterations
+ */
+ protected function getRunDate($currentTime = null, $nth = 0, $invert = false, $allowCurrentDate = false)
+ {
+ if ($currentTime instanceof DateTime) {
+ $currentDate = $currentTime;
+ } else {
+ $currentDate = new DateTime($currentTime ? $currentTime : 'now');
+ $currentDate->setTimezone(new DateTimeZone(date_default_timezone_get()));
+ }
+
+ $currentDate->setTime($currentDate->format('H'), $currentDate->format('i'), 0);
+ $nextRun = clone $currentDate;
+ $nth = (int) $nth;
+
+ // Set a hard limit to bail on an impossible date
+ for ($i = 0; $i < 1000; $i++) {
+
+ foreach (self::$order as $position) {
+ $part = $this->getExpression($position);
+ if (null === $part) {
+ continue;
+ }
+
+ $satisfied = false;
+ // Get the field object used to validate this part
+ $field = $this->fieldFactory->getField($position);
+ // Check if this is singular or a list
+ if (strpos($part, ',') === false) {
+ $satisfied = $field->isSatisfiedBy($nextRun, $part);
+ } else {
+ foreach (array_map('trim', explode(',', $part)) as $listPart) {
+ if ($field->isSatisfiedBy($nextRun, $listPart)) {
+ $satisfied = true;
+ break;
+ }
+ }
+ }
+
+ // If the field is not satisfied, then start over
+ if (!$satisfied) {
+ $field->increment($nextRun, $invert);
+ continue 2;
+ }
+ }
+
+ // Skip this match if needed
+ if ((!$allowCurrentDate && $nextRun == $currentDate) || --$nth > -1) {
+ $this->fieldFactory->getField(0)->increment($nextRun, $invert);
+ continue;
+ }
+
+ return $nextRun;
+ }
+
+ // @codeCoverageIgnoreStart
+ throw new RuntimeException('Impossible CRON expression');
+ // @codeCoverageIgnoreEnd
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_AbstractField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_AbstractField.php
new file mode 100644
index 00000000..f8d5c00a
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_AbstractField.php
@@ -0,0 +1,100 @@
+
+ */
+abstract class CronExpression_AbstractField implements CronExpression_FieldInterface
+{
+ /**
+ * Check to see if a field is satisfied by a value
+ *
+ * @param string $dateValue Date value to check
+ * @param string $value Value to test
+ *
+ * @return bool
+ */
+ public function isSatisfied($dateValue, $value)
+ {
+ if ($this->isIncrementsOfRanges($value)) {
+ return $this->isInIncrementsOfRanges($dateValue, $value);
+ } elseif ($this->isRange($value)) {
+ return $this->isInRange($dateValue, $value);
+ }
+
+ return $value == '*' || $dateValue == $value;
+ }
+
+ /**
+ * Check if a value is a range
+ *
+ * @param string $value Value to test
+ *
+ * @return bool
+ */
+ public function isRange($value)
+ {
+ return strpos($value, '-') !== false;
+ }
+
+ /**
+ * Check if a value is an increments of ranges
+ *
+ * @param string $value Value to test
+ *
+ * @return bool
+ */
+ public function isIncrementsOfRanges($value)
+ {
+ return strpos($value, '/') !== false;
+ }
+
+ /**
+ * Test if a value is within a range
+ *
+ * @param string $dateValue Set date value
+ * @param string $value Value to test
+ *
+ * @return bool
+ */
+ public function isInRange($dateValue, $value)
+ {
+ $parts = array_map('trim', explode('-', $value, 2));
+
+ return $dateValue >= $parts[0] && $dateValue <= $parts[1];
+ }
+
+ /**
+ * Test if a value is within an increments of ranges (offset[-to]/step size)
+ *
+ * @param string $dateValue Set date value
+ * @param string $value Value to test
+ *
+ * @return bool
+ */
+ public function isInIncrementsOfRanges($dateValue, $value)
+ {
+ $parts = array_map('trim', explode('/', $value, 2));
+ $stepSize = isset($parts[1]) ? $parts[1] : 0;
+ if ($parts[0] == '*' || $parts[0] === '0') {
+ return (int) $dateValue % $stepSize == 0;
+ }
+
+ $range = explode('-', $parts[0], 2);
+ $offset = $range[0];
+ $to = isset($range[1]) ? $range[1] : $dateValue;
+ // Ensure that the date value is within the range
+ if ($dateValue < $offset || $dateValue > $to) {
+ return false;
+ }
+
+ for ($i = $offset; $i <= $to; $i+= $stepSize) {
+ if ($i == $dateValue) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php
new file mode 100644
index 00000000..40c1d6c6
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfMonthField.php
@@ -0,0 +1,110 @@
+
+ */
+class CronExpression_DayOfMonthField extends CronExpression_AbstractField
+{
+ /**
+ * Get the nearest day of the week for a given day in a month
+ *
+ * @param int $currentYear Current year
+ * @param int $currentMonth Current month
+ * @param int $targetDay Target day of the month
+ *
+ * @return DateTime Returns the nearest date
+ */
+ private static function getNearestWeekday($currentYear, $currentMonth, $targetDay)
+ {
+ $tday = str_pad($targetDay, 2, '0', STR_PAD_LEFT);
+ $target = new DateTime("$currentYear-$currentMonth-$tday");
+ $currentWeekday = (int) $target->format('N');
+
+ if ($currentWeekday < 6) {
+ return $target;
+ }
+
+ $lastDayOfMonth = $target->format('t');
+
+ foreach (array(-1, 1, -2, 2) as $i) {
+ $adjusted = $targetDay + $i;
+ if ($adjusted > 0 && $adjusted <= $lastDayOfMonth) {
+ $target->setDate($currentYear, $currentMonth, $adjusted);
+ if ($target->format('N') < 6 && $target->format('m') == $currentMonth) {
+ return $target;
+ }
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isSatisfiedBy(DateTime $date, $value)
+ {
+ // ? states that the field value is to be skipped
+ if ($value == '?') {
+ return true;
+ }
+
+ $fieldValue = $date->format('d');
+
+ // Check to see if this is the last day of the month
+ if ($value == 'L') {
+ return $fieldValue == $date->format('t');
+ }
+
+ // Check to see if this is the nearest weekday to a particular value
+ if (strpos($value, 'W')) {
+ // Parse the target day
+ $targetDay = substr($value, 0, strpos($value, 'W'));
+ // Find out if the current day is the nearest day of the week
+ return $date->format('j') == self::getNearestWeekday(
+ $date->format('Y'),
+ $date->format('m'),
+ $targetDay
+ )->format('j');
+ }
+
+ return $this->isSatisfied($date->format('d'), $value);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function increment(DateTime $date, $invert = false)
+ {
+ if ($invert) {
+ $date->modify('previous day');
+ $date->setTime(23, 59);
+ } else {
+ $date->modify('next day');
+ $date->setTime(0, 0);
+ }
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function validate($value)
+ {
+ return (bool) preg_match('/[\*,\/\-\?LW0-9A-Za-z]+/', $value);
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php
new file mode 100644
index 00000000..e9f68a7c
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php
@@ -0,0 +1,124 @@
+
+ */
+class CronExpression_DayOfWeekField extends CronExpression_AbstractField
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isSatisfiedBy(DateTime $date, $value)
+ {
+ if ($value == '?') {
+ return true;
+ }
+
+ // Convert text day of the week values to integers
+ $value = str_ireplace(
+ array('SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'),
+ range(0, 6),
+ $value
+ );
+
+ $currentYear = $date->format('Y');
+ $currentMonth = $date->format('m');
+ $lastDayOfMonth = $date->format('t');
+
+ // Find out if this is the last specific weekday of the month
+ if (strpos($value, 'L')) {
+ $weekday = str_replace('7', '0', substr($value, 0, strpos($value, 'L')));
+ $tdate = clone $date;
+ $tdate->setDate($currentYear, $currentMonth, $lastDayOfMonth);
+ while ($tdate->format('w') != $weekday) {
+ $tdate->setDate($currentYear, $currentMonth, --$lastDayOfMonth);
+ }
+
+ return $date->format('j') == $lastDayOfMonth;
+ }
+
+ // Handle # hash tokens
+ if (strpos($value, '#')) {
+ list($weekday, $nth) = explode('#', $value);
+ // Validate the hash fields
+ if ($weekday < 1 || $weekday > 5) {
+ throw new InvalidArgumentException("Weekday must be a value between 1 and 5. {$weekday} given");
+ }
+ if ($nth > 5) {
+ throw new InvalidArgumentException('There are never more than 5 of a given weekday in a month');
+ }
+ // The current weekday must match the targeted weekday to proceed
+ if ($date->format('N') != $weekday) {
+ return false;
+ }
+
+ $tdate = clone $date;
+ $tdate->setDate($currentYear, $currentMonth, 1);
+ $dayCount = 0;
+ $currentDay = 1;
+ while ($currentDay < $lastDayOfMonth + 1) {
+ if ($tdate->format('N') == $weekday) {
+ if (++$dayCount >= $nth) {
+ break;
+ }
+ }
+ $tdate->setDate($currentYear, $currentMonth, ++$currentDay);
+ }
+
+ return $date->format('j') == $currentDay;
+ }
+
+ // Handle day of the week values
+ if (strpos($value, '-')) {
+ $parts = explode('-', $value);
+ if ($parts[0] == '7') {
+ $parts[0] = '0';
+ } elseif ($parts[1] == '0') {
+ $parts[1] = '7';
+ }
+ $value = implode('-', $parts);
+ }
+
+ // Test to see which Sunday to use -- 0 == 7 == Sunday
+ $format = in_array(7, str_split($value)) ? 'N' : 'w';
+ $fieldValue = $date->format($format);
+
+ return $this->isSatisfied($fieldValue, $value);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function increment(DateTime $date, $invert = false)
+ {
+ if ($invert) {
+ $date->modify('-1 day');
+ $date->setTime(23, 59, 0);
+ } else {
+ $date->modify('+1 day');
+ $date->setTime(0, 0, 0);
+ }
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function validate($value)
+ {
+ return (bool) preg_match('/[\*,\/\-0-9A-Z]+/', $value);
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldFactory.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldFactory.php
new file mode 100644
index 00000000..556ba1a3
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldFactory.php
@@ -0,0 +1,55 @@
+
+ * @link http://en.wikipedia.org/wiki/Cron
+ */
+class CronExpression_FieldFactory
+{
+ /**
+ * @var array Cache of instantiated fields
+ */
+ private $fields = array();
+
+ /**
+ * Get an instance of a field object for a cron expression position
+ *
+ * @param int $position CRON expression position value to retrieve
+ *
+ * @return CronExpression_FieldInterface
+ * @throws InvalidArgumentException if a position is not valid
+ */
+ public function getField($position)
+ {
+ if (!isset($this->fields[$position])) {
+ switch ($position) {
+ case 0:
+ $this->fields[$position] = new CronExpression_MinutesField();
+ break;
+ case 1:
+ $this->fields[$position] = new CronExpression_HoursField();
+ break;
+ case 2:
+ $this->fields[$position] = new CronExpression_DayOfMonthField();
+ break;
+ case 3:
+ $this->fields[$position] = new CronExpression_MonthField();
+ break;
+ case 4:
+ $this->fields[$position] = new CronExpression_DayOfWeekField();
+ break;
+ case 5:
+ $this->fields[$position] = new CronExpression_YearField();
+ break;
+ default:
+ throw new InvalidArgumentException(
+ $position . ' is not a valid position'
+ );
+ }
+ }
+
+ return $this->fields[$position];
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldInterface.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldInterface.php
new file mode 100644
index 00000000..5d5109b7
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_FieldInterface.php
@@ -0,0 +1,39 @@
+
+ */
+interface CronExpression_FieldInterface
+{
+ /**
+ * Check if the respective value of a DateTime field satisfies a CRON exp
+ *
+ * @param DateTime $date DateTime object to check
+ * @param string $value CRON expression to test against
+ *
+ * @return bool Returns TRUE if satisfied, FALSE otherwise
+ */
+ public function isSatisfiedBy(DateTime $date, $value);
+
+ /**
+ * When a CRON expression is not satisfied, this method is used to increment
+ * or decrement a DateTime object by the unit of the cron field
+ *
+ * @param DateTime $date DateTime object to change
+ * @param bool $invert (optional) Set to TRUE to decrement
+ *
+ * @return CronExpression_FieldInterface
+ */
+ public function increment(DateTime $date, $invert = false);
+
+ /**
+ * Validates a CRON expression for a given field
+ *
+ * @param string $value CRON expression value to validate
+ *
+ * @return bool Returns TRUE if valid, FALSE otherwise
+ */
+ public function validate($value);
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_HoursField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_HoursField.php
new file mode 100644
index 00000000..088ca73c
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_HoursField.php
@@ -0,0 +1,47 @@
+
+ */
+class CronExpression_HoursField extends CronExpression_AbstractField
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isSatisfiedBy(DateTime $date, $value)
+ {
+ return $this->isSatisfied($date->format('H'), $value);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function increment(DateTime $date, $invert = false)
+ {
+ // Change timezone to UTC temporarily. This will
+ // allow us to go back or forwards and hour even
+ // if DST will be changed between the hours.
+ $timezone = $date->getTimezone();
+ $date->setTimezone(new DateTimeZone('UTC'));
+ if ($invert) {
+ $date->modify('-1 hour');
+ $date->setTime($date->format('H'), 59);
+ } else {
+ $date->modify('+1 hour');
+ $date->setTime($date->format('H'), 0);
+ }
+ $date->setTimezone($timezone);
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function validate($value)
+ {
+ return (bool) preg_match('/[\*,\/\-0-9]+/', $value);
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php
new file mode 100644
index 00000000..436acf2f
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MinutesField.php
@@ -0,0 +1,39 @@
+
+ */
+class CronExpression_MinutesField extends CronExpression_AbstractField
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isSatisfiedBy(DateTime $date, $value)
+ {
+ return $this->isSatisfied($date->format('i'), $value);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function increment(DateTime $date, $invert = false)
+ {
+ if ($invert) {
+ $date->modify('-1 minute');
+ } else {
+ $date->modify('+1 minute');
+ }
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function validate($value)
+ {
+ return (bool) preg_match('/[\*,\/\-0-9]+/', $value);
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MonthField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MonthField.php
new file mode 100644
index 00000000..d3deb129
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_MonthField.php
@@ -0,0 +1,55 @@
+
+ */
+class CronExpression_MonthField extends CronExpression_AbstractField
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isSatisfiedBy(DateTime $date, $value)
+ {
+ // Convert text month values to integers
+ $value = str_ireplace(
+ array(
+ 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN',
+ 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'
+ ),
+ range(1, 12),
+ $value
+ );
+
+ return $this->isSatisfied($date->format('m'), $value);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function increment(DateTime $date, $invert = false)
+ {
+ if ($invert) {
+ // $date->modify('last day of previous month'); // remove for php 5.2 compat
+ $date->modify('previous month');
+ $date->modify($date->format('Y-m-t'));
+ $date->setTime(23, 59);
+ } else {
+ //$date->modify('first day of next month'); // remove for php 5.2 compat
+ $date->modify('next month');
+ $date->modify($date->format('Y-m-01'));
+ $date->setTime(0, 0);
+ }
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function validate($value)
+ {
+ return (bool) preg_match('/[\*,\/\-0-9A-Z]+/', $value);
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_YearField.php b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_YearField.php
new file mode 100644
index 00000000..f11562e4
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/CronExpression_YearField.php
@@ -0,0 +1,43 @@
+
+ */
+class CronExpression_YearField extends CronExpression_AbstractField
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function isSatisfiedBy(DateTime $date, $value)
+ {
+ return $this->isSatisfied($date->format('Y'), $value);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function increment(DateTime $date, $invert = false)
+ {
+ if ($invert) {
+ $date->modify('-1 year');
+ $date->setDate($date->format('Y'), 12, 31);
+ $date->setTime(23, 59, 0);
+ } else {
+ $date->modify('+1 year');
+ $date->setDate($date->format('Y'), 1, 1);
+ $date->setTime(0, 0, 0);
+ }
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function validate($value)
+ {
+ return (bool) preg_match('/[\*,\/\-0-9]+/', $value);
+ }
+}
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/LICENSE b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/LICENSE
new file mode 100644
index 00000000..c6d88ac6
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/lib/cron-expression/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Michael Dowling and contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/license.txt b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/license.txt
new file mode 100644
index 00000000..f288702d
--- /dev/null
+++ b/wp-content/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/license.txt
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/wp-content/plugins/wp-mail-smtp/wp_mail_smtp.php b/wp-content/plugins/wp-mail-smtp/wp_mail_smtp.php
index 248382c5..b6f59261 100644
--- a/wp-content/plugins/wp-mail-smtp/wp_mail_smtp.php
+++ b/wp-content/plugins/wp-mail-smtp/wp_mail_smtp.php
@@ -1,7 +1,7 @@
wp_mail() function to use Gmail/Mailgun/SendGrid/SMTP instead of the default mail() and creates an options page to manage the settings.
* Author: WPForms
@@ -203,7 +203,7 @@ if ( ! function_exists( 'wp_mail_smtp_insecure_php_version_notice' ) ) {
}
if ( ! defined( 'WPMS_PLUGIN_VER' ) ) {
- define( 'WPMS_PLUGIN_VER', '2.0.1' );
+ define( 'WPMS_PLUGIN_VER', '2.1.1' );
}
if ( ! defined( 'WPMS_PHP_VER' ) ) {
define( 'WPMS_PHP_VER', '5.5.0' );