wpsc_add_product_category_default

Wpsc_add_product_category_default, if there is no category assigned assign first product category as default.

Description

(null) wpsc_add_product_category_default( $product_id ); 

Returns (null)

Parameters (1)

0. $product_id
(int) the Post ID

Usage

  1. if ( !function_exists( 'wpsc_add_product_category_default' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'wp-ecommerce/wpsc-admin/includes/product-functions.php'; 
  3.  
  4. // (int) the Post ID 
  5. $product_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wpsc_add_product_category_default($product_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wpsc-admin/includes/product-functions.php