Server IP : 192.64.118.117 / Your IP : 3.15.164.218 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/thecgapy/www/wp-content/plugins/go_pricing/includes/core/ |
Upload File : |
<?php /** * Class for plugin addons */ // Prevent direct call if ( !defined( 'WPINC' ) ) die; if ( !class_exists( 'GW_GoPricing' ) ) die; // Class class GW_GoPricing_Addon { protected $globals; protected static $plugin_version; protected static $db_version; protected static $plugin_prefix; protected static $plugin_slug; protected static $plugin_path; protected static $addon; /** * Initialize the class * * @return void */ public function __construct() { $this->globals = GW_GoPricing::instance(); self::$plugin_version = $this->globals['plugin_version']; self::$db_version = $this->globals['db_version']; self::$plugin_prefix = $this->globals['plugin_prefix']; self::$plugin_slug = $this->globals['plugin_slug']; self::$plugin_path = $this->globals['plugin_path']; } /** * Register addon * * @return void */ public static function register( $addon ) { if ( empty( $addon ) || empty( $addon['id'] ) || empty( $addon['slug'] ) || empty( $addon['base'] ) || empty( $addon['version'] ) ) return false; $apicall = new GW_GoPricing_Api( array( 'product' => 'go_pricing', 'type' => 'info' ) ); $api_data = $apicall->get_data(); if ( !empty( $api_data['addons'][$addon['id']] ) ) $addon['api_data'] = $api_data['addons'][$addon['id']]; global $go_pricing; self::$addon = $go_pricing['addons'][$addon['id']] = $addon; } } ?>