GRAYBYTE WORDPRESS FILE MANAGER5924

Server IP : 162.213.255.40 / Your IP : 216.73.216.121
System : Linux server146.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
PHP Version : 8.0.30
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF

HOME

/home/hellrfbn/public_html/wp-content/plugins/jetpack/3rd-party/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/hellrfbn/public_html/wp-content/plugins/jetpack/3rd-party//woocommerce-services.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName

use Automattic\Jetpack\Plugins_Installer;

if ( ! defined( 'ABSPATH' ) ) {
	exit( 0 );
}

/**
 * Installs and activates the WooCommerce Services plugin.
 */
class WC_Services_Installer {

	/**
	 * The instance of the Jetpack class.
	 *
	 * @var Jetpack
	 */
	private $jetpack;

	/**
	 * The singleton instance of this class.
	 *
	 * @var WC_Services_Installer
	 */
	private static $instance = null;

	/**
	 * Returns the singleton instance of this class.
	 *
	 * @return object The WC_Services_Installer object.
	 */
	public static function init() {
		if ( self::$instance === null ) {
			self::$instance = new WC_Services_Installer();
		}
		return self::$instance;
	}

	/**
	 * Constructor
	 */
	public function __construct() {
		add_action( 'jetpack_loaded', array( $this, 'on_jetpack_loaded' ) );
		if ( ! empty( $_GET['wc-services-install-error'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
			add_action( 'admin_notices', array( $this, 'error_notice' ) );
		}

		if ( isset( $_GET['wc-services-action'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
			add_action( 'admin_init', array( $this, 'try_install' ) );
		}
	}

	/**
	 * Runs on Jetpack being ready to load its packages.
	 *
	 * @param Jetpack $jetpack object.
	 */
	public function on_jetpack_loaded( $jetpack ) {
		$this->jetpack = $jetpack;
	}

	/**
	 * Verify the intent to install WooCommerce Services, and kick off installation.
	 */
	public function try_install() {
		if ( ! isset( $_GET['wc-services-action'] ) ) {
			return;
		}
		check_admin_referer( 'wc-services-install' );

		$result = false;

		switch ( $_GET['wc-services-action'] ) {
			case 'install':
				if ( current_user_can( 'install_plugins' ) ) {
					$this->jetpack->stat( 'jitm', 'wooservices-install-' . JETPACK__VERSION );
					$result = $this->install();
					if ( $result ) {
						$result = $this->activate();
					}
				}
				break;

			case 'activate':
				if ( current_user_can( 'activate_plugins' ) ) {
					$this->jetpack->stat( 'jitm', 'wooservices-activate-' . JETPACK__VERSION );
					$result = $this->activate();
				}
				break;
		}

		if ( isset( $_GET['redirect'] ) ) {
			$redirect = home_url( esc_url_raw( wp_unslash( $_GET['redirect'] ) ) );
		} else {
			$redirect = admin_url();
		}

		if ( $result ) {
			$this->jetpack->stat( 'jitm', 'wooservices-activated-' . JETPACK__VERSION );
		} else {
			$redirect = add_query_arg( 'wc-services-install-error', true, $redirect );
		}

		wp_safe_redirect( $redirect );

		exit( 0 );
	}

	/**
	 * Notify the user that the installation of WooCommerce Services failed.
	 */
	public function error_notice() {
		wp_admin_notice(
			esc_html__( 'There was an error installing WooCommerce Services.', 'jetpack' ),
			array(
				'type'        => 'error',
				'dismissible' => true,
			)
		);
	}

	/**
	 * Download and install the WooCommerce Services plugin.
	 *
	 * @return bool result of installation
	 */
	private function install() {
		$result = Plugins_Installer::install_plugin( 'woocommerce-services' );

		if ( is_wp_error( $result ) ) {
			return false;
		} else {
			return true;
		}
	}

	/**
	 * Activate the WooCommerce Services plugin.
	 *
	 * @return bool result of activation
	 */
	private function activate() {
		$result = activate_plugin( 'woocommerce-services/woocommerce-services.php' );

		// Activate_plugin() returns null on success.
		return $result === null;
	}
}

WC_Services_Installer::init();

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
debug-bar
--
July 23 2025 07:38:28
hellrfbn / hellrfbn
0755
.htaccess
0.41 KB
July 23 2025 07:38:28
hellrfbn / hellrfbn
0644
3rd-party.php
2.853 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
amp.php
0.728 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
atomic.php
0.999 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
bbpress.php
2.034 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
beaverbuilder.php
0.466 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
bitly.php
0.959 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
buddypress.php
0.491 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
class-domain-mapping.php
4.121 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
class-jetpack-bbpress-rest-api.php
4.391 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
class.jetpack-amp-support.php
15.971 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
creative-mail.php
3.256 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
debug-bar.php
0.716 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
jetpack-backup.php
2.752 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
jetpack-boost.php
2.802 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
qtranslate-x.php
0.619 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
vaultpress.php
2.115 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
web-stories.php
0.956 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
woocommerce-services.php
3.45 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
woocommerce.php
3.774 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
wpcom-reader.php
1.743 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644
wpml.php
1.595 KB
February 05 2025 15:44:59
hellrfbn / hellrfbn
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF