public static final function init() { // init payment processors self::get_payment_processor(); // always load all enabled processors on admin pages if (is_admin()) { self::load_enabled_processors(); // store option after locale can be loaded. add_filter('shutdown', array(__CLASS__, 'store_format_option')); } // Settings self::$currency_symbol = get_option(self::CURRENCY_SYMBOL_OPTION, '$'); self::$money_format = get_option(self::MONEY_FORMAT_OPTION, '%0.2f'); self::register_payment_settings(); // Help Sections add_action('admin_menu', array(get_class(), 'help_sections')); // AJAX utility add_action('wp_ajax_si_manually_capture_payment', array(__CLASS__, 'manually_capture_payment'), 10, 0); add_action('wp_ajax_si_mark_payment_complete', array(__CLASS__, 'manually_mark_complete'), 10, 0); // Main section add_action('si_payments_pane', array(__CLASS__, 'show_payments_pane'), 100); // js add_filter('si_admin_scripts_localization', array(__CLASS__, 'add_currency_options')); }