Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I was searching WP Ecommerce documentation, trying to find what function to use to add category to WPEC, but no luck. Is there some function or piece of code that can do this?

share|improve this question

closed as off-topic by Johannes Pille, Pieter Goosen, cybmeta, kaiser Nov 11 at 13:32

This question appears to be off-topic. The users who voted to close gave these specific reasons:

If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

You can use wp_insert_term to add terms to the wpsc_product_category taxonomy:

<?php
$args = array(
    'description'=> 'term description.',
    'slug' => 'my-term'
);
wp_insert_term( 'My term', 'wpsc_product_category', $args );
?>
share|improve this answer
    
Yep, thats it, tnx a lot. –  SomeoneS Jun 28 '12 at 14:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.