Server IP : 172.67.158.161 / Your IP : 3.14.129.43 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/giankuin/khowordpress.com/wp-content/plugins/woocommerce/includes/rest-api/Utilities/ |
Upload File : |
<?php /** * Singleton class trait. * * @package WooCommerce\Utilities */ namespace Automattic\WooCommerce\RestApi\Utilities; /** * Singleton trait. */ trait SingletonTrait { /** * The single instance of the class. * * @var object */ protected static $instance = null; /** * Constructor * * @return void */ protected function __construct() {} /** * Get class instance. * * @return object Instance. */ final public static function instance() { if ( null === static::$instance ) { static::$instance = new static(); } return static::$instance; } /** * Prevent cloning. */ private function __clone() {} /** * Prevent unserializing. */ final public function __wakeup() { wc_doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of this class is forbidden.', 'woocommerce' ), '4.6' ); die(); } }