public function __construct() { if (self::$request === null) { self::$request = new Request(array('server' => self::SERVER)); } return self::$request; }
public function __construct() { // $this->api_key = $api_key; if (self::$request === null) { self::$request = new Request(array('server' => self::SERVER)); } return self::$request; }
function global_myongkir_init() { require_once plugin_dir_path(__FILE__) . 'class/myongkir-shipping.php'; // define nonce constans define("MYONGKIR_NONCE", "myongkir-nonce"); $myongkir_shipping = MyOngkir_Shipping::get_instance(); $rajaongkir_api_key = get_option('woocommerce_rajaongkir_api_key'); $myongkir_shipping->set_api_key($rajaongkir_api_key); $GLOBALS['myongkir'] = $myongkir_shipping; }