PluginProbe ʕ •ᴥ•ʔ
WP Mail SMTP by WPForms – The Most Popular SMTP and Email Log Plugin / 3.11.0
WP Mail SMTP by WPForms – The Most Popular SMTP and Email Log Plugin v3.11.0
4.9.0 0.9.6 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.6.0 1.6.2 1.7.0 1.7.1 1.8.0 1.8.1 1.9.0 2.0.0 2.0.1 2.1.1 2.2.1 2.3.1 2.4.0 2.5.0 2.5.1 2.6.0 2.7.0 2.8.0 2.9.0 3.0.1 3.0.2 3.0.3 3.1.0 3.10.0 3.11.0 3.11.1 3.2.0 3.2.1 3.3.0 3.4.0 3.5.0 3.5.1 3.5.2 3.6.1 3.7.0 3.8.0 3.8.2 3.9.0 4.0.1 4.1.0 4.1.1 4.2.0 4.3.0 4.4.0 4.5.0 4.6.0 4.7.0 4.7.1 4.8.0 trunk 0.10.0 0.10.1 0.11.1 0.11.2 0.3.1 0.3.2 0.4 0.4.1 0.4.2 0.5.0 0.5.1 0.5.2 0.6 0.7 0.8 0.8.2 0.8.3 0.8.4 0.8.5 0.8.6 0.8.7 0.9.0 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5
wp-mail-smtp / vendor / woocommerce / action-scheduler / classes / migration / LogMigrator.php
wp-mail-smtp / vendor / woocommerce / action-scheduler / classes / migration Last commit date
ActionMigrator.php 2 years ago ActionScheduler_DBStoreMigrator.php 2 years ago BatchFetcher.php 2 years ago Config.php 2 years ago Controller.php 2 years ago DryRun_ActionMigrator.php 2 years ago DryRun_LogMigrator.php 2 years ago LogMigrator.php 2 years ago Runner.php 2 years ago Scheduler.php 2 years ago
LogMigrator.php
50 lines
1 <?php
2
3
4 namespace Action_Scheduler\Migration;
5
6 use ActionScheduler_Logger;
7
8 /**
9 * Class LogMigrator
10 *
11 * @package Action_Scheduler\Migration
12 *
13 * @since 3.0.0
14 *
15 * @codeCoverageIgnore
16 */
17 class LogMigrator {
18 /** @var ActionScheduler_Logger */
19 private $source;
20
21 /** @var ActionScheduler_Logger */
22 private $destination;
23
24 /**
25 * ActionMigrator constructor.
26 *
27 * @param ActionScheduler_Logger $source_logger Source logger object.
28 * @param ActionScheduler_Logger $destination_Logger Destination logger object.
29 */
30 public function __construct( ActionScheduler_Logger $source_logger, ActionScheduler_Logger $destination_Logger ) {
31 $this->source = $source_logger;
32 $this->destination = $destination_Logger;
33 }
34
35 /**
36 * Migrate an action log.
37 *
38 * @param int $source_action_id Source logger object.
39 * @param int $destination_action_id Destination logger object.
40 */
41 public function migrate( $source_action_id, $destination_action_id ) {
42 $logs = $this->source->get_logs( $source_action_id );
43 foreach ( $logs as $log ) {
44 if ( $log->get_action_id() == $source_action_id ) {
45 $this->destination->log( $destination_action_id, $log->get_message(), $log->get_date() );
46 }
47 }
48 }
49 }
50