/** * Setup the WPEC core * * @uses do_action() Calls 'wpsc_pre_load' which runs before WPEC setup * @uses do_action() Calls 'wpsc_before_init' which is a legacy action * @uses _wpsc_action_create_customer_id() Sets up a customer id just in case we don't have it * @uses wpsc_core_setup_globals() Sets up the WPEC core globals * @uses wpsc_core_setup_cart() Sets up the WPEC core cart * @uses wpsc_core_load_thumbnail_sizes() Sets up the core WPEC thumbnail sizes * @uses wpsc_core_load_purchase_log_statuses() Loads the statuses for the purchase logs * @uses wpsc_core_load_checkout_data() Sets up the core WPEC form checkout data * @uses wpsc_core_load_gateways() Loads the merchants from the directory * @uses wpsc_core_load_shipping_modules() Gets shipping modules from the shipping directory * @uses wpsc_core_load_page_titles() Loads the core WPEC pagetitles * @uses do_action() Calls 'wpsc_loaded' which runs after WPEC is fully loaded */ public function load() { // Before setup do_action('wpsc_pre_load'); // Legacy action do_action('wpsc_before_init'); // Setup the core WPEC globals wpsc_core_setup_globals(); add_action('init', '_wpsc_action_setup_customer', 1); // WPEC is ready to use as soon as WordPress and customer is setup and loaded add_action('init', array(&$this, '_wpsc_fire_ready_action'), 100); // Load the purchase log statuses wpsc_core_load_purchase_log_statuses(); // Load unique names and checout form types wpsc_core_load_checkout_data(); // Load the gateways wpsc_core_load_gateways(); // Load the shipping modules wpsc_core_load_shipping_modules(); // WPEC is fully loaded do_action('wpsc_loaded'); }
/** * Setup the WPEC core */ function load() { // Before setup do_action('wpsc_pre_load'); // Legacy action do_action('wpsc_before_init'); // Setup the core WPEC globals wpsc_core_setup_globals(); // Setup the core WPEC cart wpsc_core_setup_cart(); // Load the thumbnail sizes wpsc_core_load_thumbnail_sizes(); // Load the purchase log statuses wpsc_core_load_purchase_log_statuses(); // Load unique names and checout form types wpsc_core_load_checkout_data(); // Load the gateways wpsc_core_load_gateways(); // Load the shipping modules wpsc_core_load_shipping_modules(); // Set page title array for important WPSC pages wpsc_core_load_page_titles(); // WPEC is fully loaded do_action('wpsc_loaded'); }