protected function __construct()
 {
     parent::__construct();
     // Remove pages
     add_filter('si_checkout_pages', array($this, 'remove_checkout_pages'));
     add_action('checkout_completed', array($this, 'post_checkout_redirect'), 10, 2);
 }
 protected function __construct()
 {
     parent::__construct();
     self::$api_username = get_option(self::API_USERNAME_OPTION);
     self::$api_password = get_option(self::API_PASSWORD_OPTION);
     self::$api_signature = get_option(self::API_SIGNATURE_OPTION);
     self::$api_mode = get_option(self::API_MODE_OPTION, self::MODE_TEST);
     self::$currency_code = get_option(self::CURRENCY_CODE_OPTION, 'USD');
     self::$cancel_url = get_option(self::CANCEL_URL_OPTION, add_query_arg(array('cancelled_paypal_payment' => 1), home_url('/')));
     if (self::$cancel_url === '') {
         $url = add_query_arg(array('cancelled_paypal_payment' => 1), home_url('/'));
         update_option(self::CANCEL_URL_OPTION, $url);
         self::$cancel_url = esc_url_raw($url);
     }
     if (is_admin()) {
         add_action('init', array(get_class(), 'register_options'));
     }
     add_action('si_checkout_action_' . SI_Checkouts::PAYMENT_PAGE, array($this, 'send_offsite'), 0, 1);
     add_action('si_checkout_action_' . SI_Checkouts::REVIEW_PAGE, array($this, 'back_from_paypal'), 0, 1);
     add_action('checkout_completed', array($this, 'post_checkout_redirect'), 10, 2);
     add_action('processed_payment', array($this, 'capture_payment_after_auth'), 10);
     add_action('si_manually_capture_purchase', array($this, 'manually_capture_purchase'), 10);
     // Add Recurring button
     add_action('recurring_payments_profile_info', array(__CLASS__, 'paypal_profile_link'));
 }