Ejemplo n.º 1
0
 function __construct()
 {
     global $camptix;
     parent::__construct();
     add_filter('camptix_available_payment_methods', array($this, '_camptix_available_payment_methods'));
     add_filter('camptix_validate_options', array($this, '_camptix_validate_options'));
     add_filter('camptix_get_payment_method_by_id', array($this, '_camptix_get_payment_method_by_id'), 10, 2);
     if (!$this->id) {
         die('id not specified in a payment method');
     }
     if (!$this->name) {
         die('name not specified in a payment method');
     }
     if (!$this->description) {
         die('description not specified in a payment method');
     }
     if (!is_array($this->supported_currencies) || count($this->supported_currencies) < 1) {
         die('supported currencies not specified in a payment method');
     }
     $this->camptix_options = $camptix->get_options();
 }
 /**
  * Constructor
  */
 function __construct()
 {
     /** @var $camptix CampTix_Plugin */
     global $camptix;
     parent::__construct();
     add_filter('camptix_available_payment_methods', array($this, '_camptix_available_payment_methods'));
     add_filter('camptix_validate_options', array($this, '_camptix_validate_options'));
     add_filter('camptix_get_payment_method_by_id', array($this, '_camptix_get_payment_method_by_id'), 10, 2);
     $payment_method = get_class($this);
     if (!$this->id) {
         wp_die("ID not specified in {$payment_method}.");
     }
     if (!$this->name) {
         wp_die("Name not specified in {$payment_method}.");
     }
     if (!$this->description) {
         wp_die("Description not specified in {$payment_method}.");
     }
     if (!is_array($this->supported_currencies) || count($this->supported_currencies) < 1) {
         wp_die("Supported currencies not specified in {$payment_method}.");
     }
     $this->camptix_options = $camptix->get_options();
 }