wpsc_started

Located in: wp-shopping-cart-php

Functions that call this hook:  start()

Version Introduced: 3.8 or earlier

Description: The start function is used to initialize the basic WPEC constants, this action is called after all the basic constants are setup and text domains loaded.

Similar Actions:  wpsc_constants(); – This is called after the core constants are set up.

Code in context:

[php firstline=”44″ highlight=”63″]

/**

* Initialize the basic WPEC constants

*/

function start() {

// Set the core file path

define( ‘WPSC_FILE_PATH’, dirname( __FILE__ ) );

// Define the path to the plugin folder

define( ‘WPSC_DIR_NAME’, basename( WPSC_FILE_PATH ) );

// Define the URL to the plugin folder

define( ‘WPSC_FOLDER’, dirname( plugin_basename( __FILE__ ) ) );

define( ‘WPSC_URL’, plugins_url( ”, __FILE__ ) );

//load text domain

if( !load_plugin_textdomain( ‘wpsc’, false, ‘../languages/’ ) )

load_plugin_textdomain( ‘wpsc’, false, dirname( plugin_basename( __FILE__ ) ) . ‘/wpsc-languages/’ );

// Finished starting

do_action( ‘wpsc_started’ );

}

[/php]