WordPress at Your Fingertips
function is not described

wc_update_330_set_default_product_cat() WC 1.0

Assign default cat to all products with no cats.

No Hooks.

Return

null. Nothing.

Usage

wc_update_330_set_default_product_cat();

Code of wc_update_330_set_default_product_cat() WC 5.5.2

<?php
function wc_update_330_set_default_product_cat() {
	/*
	 * When a product category is deleted, we need to check
	 * if the product has no categories assigned. Then assign
	 * it a default category.
	 */
	wc_get_container()->get( AssignDefaultCategory::class )->maybe_assign_default_product_cat();
}