rebase from live enviornment

This commit is contained in:
Rachit Bhargava
2024-01-09 22:14:20 -05:00
parent ff0b49a046
commit 3a22fcaa4a
15968 changed files with 2344674 additions and 45234 deletions

View File

@@ -2,9 +2,10 @@
namespace WPMailSMTP\Admin\Pages;
use Plugin_Upgrader;
use WPMailSMTP\Admin\PageAbstract;
use WPMailSMTP\Admin\PluginsInstallSkin;
use WPMailSMTP\Admin\PluginsInstallUpgrader;
use WPMailSMTP\Helpers\Helpers;
/**
* About tab.
@@ -603,7 +604,14 @@ class AboutTab extends PageAbstract {
)
);
/*
* The `request_filesystem_credentials` function will output a credentials form in case of failure.
* We don't want that, since it will break AJAX response. So just hide output with a buffer.
*/
ob_start();
// phpcs:ignore WPForms.Formatting.EmptyLineAfterAssigmentVariables.AddEmptyLine
$creds = request_filesystem_credentials( $url, '', false, false, null );
ob_end_clean();
// Check for file system permissions.
if ( false === $creds ) {
@@ -617,8 +625,11 @@ class AboutTab extends PageAbstract {
// Do not allow WordPress to search/download translations, as this will break JS output.
remove_action( 'upgrader_process_complete', [ 'Language_Pack_Upgrader', 'async_upgrade' ], 20 );
// Import the plugin upgrader.
Helpers::include_plugin_upgrader();
// Create the plugin upgrader with our custom skin.
$installer = new PluginsInstallUpgrader( new PluginsInstallSkin() );
$installer = new Plugin_Upgrader( new PluginsInstallSkin() );
// Error check.
if ( ! method_exists( $installer, 'install' ) ) {

View File

@@ -6,7 +6,6 @@ use WPMailSMTP\Admin\ConnectionSettings;
use WPMailSMTP\Admin\PageAbstract;
use WPMailSMTP\Admin\SetupWizard;
use WPMailSMTP\Options;
use WPMailSMTP\Providers\Gmail\Auth;
use WPMailSMTP\WP;
/**