Answers for "wc create new category"

PHP
0

wc create new category

wp_insert_term(
  'New Category', // the term 
  'product_cat', // the taxonomy
  array(
    'description'=> 'Category description',
    'slug' => 'new-category'
  )
);
Posted by: Guest on April-23-2021

Browse Popular Code Answers by Language