wpsc_constants

Located in: wp-shopping-cart-php

Functions that call this hook: constants()

Version Introduced: 3.8

Description: This hook is called after the default core constants have been added. You could use this hook to add any additional constants for your plugin.

Code in context:
[php firstline=”69″ highlight=”98″]
/**
* Setup the WPEC core constants
*/
function constants() {
// Define globals and constants used by wp-e-commerce
require_once( WPSC_FILE_PATH . ‘/wpsc-core/wpsc-constants.php’ );

// Load the WPEC core constants
wpsc_core_constants();

// Is WordPress Multisite
wpsc_core_is_multisite();

// Start the wpsc session
wpsc_core_load_session();

// Which version of WPEC
wpsc_core_constants_version_processing();

// WPEC Table names and related constants
wpsc_core_constants_table_names();

// Uploads directory info
wpsc_core_constants_uploads();

// Purchase log statuses
wpsc_core_constants_purchase_logs();

// Any additional constants can hook in here
do_action( ‘wpsc_constants’ );
}

[/php]

Example Use:
[php]
add_action(‘wpsc_constants’,’add_my_constant’);
function add_my_constant(){
define( ‘MY_WPSC_CONSTANT’, ‘some_value’ );
}
[/php]