예제 #1
0
    protected function setup(){
        parent::setup();

        $installed_version = get_option("gravityformsaddon_payment_version");

        $installed_addons = get_option("gravityformsaddon_payment_addons");
        if( !is_array($installed_addons) )
            $installed_addons = array();

        if ( $installed_version != $this->_payment_version ){
            $this->upgrade_payment($installed_version);

            $installed_addons = array($this->_slug);
            update_option("gravityformsaddon_payment_addons", $installed_addons);
        }
        else if( !in_array($this->_slug, $installed_addons) ){
            $this->upgrade_payment($installed_version);

            $installed_addons[] = $this->_slug;
            update_option("gravityformsaddon_payment_addons", $installed_addons);
        }

        update_option("gravityformsaddon_payment_version", $this->_payment_version);

    }
 protected function setup()
 {
     parent::setup();
     //upgrading Feed Add-On base class
     $installed_version = get_option("gravityformsaddon_payment_version");
     if ($installed_version != $this->_payment_version) {
         $this->upgrade_payment($installed_version);
     }
     update_option("gravityformsaddon_payment_version", $this->_payment_version);
 }
 public function setup()
 {
     parent::setup();
     $installed_version = get_option('gravityformsaddon_payment_version');
     $installed_addons = get_option('gravityformsaddon_payment_addons');
     if (!is_array($installed_addons)) {
         $installed_addons = array();
     }
     if ($installed_version != $this->_payment_version) {
         $this->upgrade_payment($installed_version);
         $installed_addons = array($this->_slug);
         update_option('gravityformsaddon_payment_addons', $installed_addons);
     } elseif (!in_array($this->_slug, $installed_addons)) {
         $this->upgrade_payment($installed_version);
         $installed_addons[] = $this->_slug;
         update_option('gravityformsaddon_payment_addons', $installed_addons);
     }
     update_option('gravityformsaddon_payment_version', $this->_payment_version);
 }
 public function setup()
 {
     parent::setup();
 }