wpdb = $wpdb; } protected function getDefault() { return json_encode((object)array( 'taxIncluded' => false, 'taxRate' => 8, 'taxNormalizer' => 'trunc', 'taxPrecision' => 0 )); } public function load() { $rule0 = get_option(self::KEY, $this->getDefault()); return json_decode($rule0, false); } public function save($rule) { update_option(self::KEY, json_encode($rule)); } }