This commit is contained in:
proelements
2025-12-29 10:01:13 +02:00
parent ce77bab1a1
commit 9bdad9d028
319 changed files with 1925 additions and 658 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace ElementorPro\Modules\Woocommerce\ImportExportCustomization;
use Elementor\App\Modules\ImportExportCustomization\Runners\Revert\Revert_Runner_Base;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Woocommerce_Settings_Revert extends Revert_Runner_Base {
public static function get_name(): string {
return 'woocommerce-settings';
}
public function should_revert( array $data ): bool {
return isset( $data['runners'][ static::get_name() ] );
}
public function revert( array $data ) {
$runner_data = $data['runners'][ static::get_name() ];
$previous_pages = $runner_data['previous_pages'] ?? [];
foreach ( $previous_pages as $key => $value ) {
update_option( $key, $value );
}
}
}