Module commands/create-term
Functions
createTerm
- createTerm(name?: string, taxonomy?: string, options?: { beforeSave?: CallableFunction; description?: string; parent?: string | number; slug?: string }): void
Parameters
name: string = 'Test category'
taxonomy: string = 'category'
options: { beforeSave?: CallableFunction; description?: string; parent?: string | number; slug?: string } = {}
Optional beforeSave?: CallableFunction
Optional description?: string
Optional parent?: string | number
Optional slug?: string
Returns void
Create a Term of a given taxonomy
Create new category with default name "Test category"
Create new category with given name
Create a category and use it's ID
Create new term in a product taxonomy
Create child category for existing Parent with custom description and slug