X7ROOT File Manager
Current Path:
/home/hikrsdyp/public_html/wp-content/plugins/wpforms-lite/src/Migrations
home
/
hikrsdyp
/
public_html
/
wp-content
/
plugins
/
wpforms-lite
/
src
/
Migrations
/
??
..
??
Base.php
(12 KB)
??
Migrations.php
(972 B)
??
Tasks
??
Upgrade159.php
(707 B)
??
Upgrade1672.php
(863 B)
??
Upgrade168.php
(1.24 KB)
??
Upgrade175.php
(2.67 KB)
??
Upgrade1751.php
(562 B)
??
Upgrade177.php
(1.21 KB)
??
Upgrade182.php
(3.04 KB)
??
Upgrade183.php
(769 B)
??
Upgrade184.php
(909 B)
??
Upgrade186.php
(395 B)
??
Upgrade187.php
(1.35 KB)
??
Upgrade1_9_1.php
(1.37 KB)
??
Upgrade1_9_2.php
(911 B)
??
Upgrade1_9_7.php
(333 B)
??
UpgradeBase.php
(3.43 KB)
Editing: Upgrade187.php
<?php namespace WPForms\Migrations; use WPForms\Admin\Builder\TemplatesCache; use WPForms\Tasks\Actions\StripeLinkSubscriptionsTask; /** * Class upgrade for 1.8.7 release. * * @since 1.8.7 * * @noinspection PhpUnused */ class Upgrade187 extends UpgradeBase { /** * Run upgrade. * * @since 1.8.7 * * @return bool|null */ public function run() { $sync_result = $this->update_templates_cache() && $this->maybe_create_logs_table(); $async_result = $this->run_async( StripeLinkSubscriptionsTask::class ); return $async_result === null ? null : $sync_result && $async_result; } /** * Update templates' cache. * * @since 1.8.7 * * @return bool */ private function update_templates_cache(): bool { $templates_cache = new TemplatesCache(); $templates_cache->init(); $templates_cache->update(); return true; } /** * Maybe create logs' table. * Previously, logs' table was created dynamically on the first access to the Tools->Logs admin page. * As from 1.8.7, we create it only once during the activation of the plugin. * So, the table may not exist, and we must maybe create it during migration to 1.8.7. * * @since 1.8.7 * * @return bool */ private function maybe_create_logs_table(): bool { $log = wpforms()->obj( 'log' ); if ( ! $log ) { return false; } $log->create_table(); return true; } }
Upload File
Create Folder