id = 'paypal'; $this->icon = file_exists(get_stylesheet_directory() . '/apptivo-ecommerce/images/paypal.png') ? get_stylesheet_directory_uri() . '/apptivo-ecommerce/images/paypal.png' :$apptivo_ecommerce->plugin_url() . '/assets/images/icons/paypal.png'; $this->init_form_fields(); $this->init_settings(); $this->title = $this->settings['title']; $this->description = $this->settings['description']; add_action('apptivo_ecommerce_update_options_payment_gateways', array(&$this, 'process_admin_options')); } function init_form_fields() { $this->form_fields = array( 'enabled' => array( 'title' => __( 'Enable/Disable', 'apptivo_ecommerce' ), 'type' => 'checkbox', 'label' => __( 'Enable PayPal', 'apptivo_ecommerce' ), 'default' => 'no' ), 'title' => array( 'title' => __( 'Title', 'apptivo_ecommerce' ), 'type' => 'text', 'description' => __( 'This controls the title which the user sees during PayPal.', 'apptivo_ecommerce' ), 'default' => __( 'PayPal', 'apptivo_ecommerce' ) ), 'description' => array( 'title' => __( 'Description', 'apptivo_ecommerce' ), 'type' => 'textarea', 'description' => __( 'This controls the description which the user sees during PayPal.', 'apptivo_ecommerce' ), 'default' => __("Pay via PayPal", 'apptivo_ecommerce') ) ); } public function admin_options() { ?>