handle bundle product prices editor and prices summary
This commit is contained in:
@@ -46,7 +46,9 @@ class Wiaas_Product_Category {
|
||||
public static function register_product_categories() {
|
||||
|
||||
foreach (self::$available_product_categories as $key => $available_product_category) {
|
||||
wp_insert_term($key, 'product_cat');
|
||||
if (! has_term_meta($key)) {
|
||||
wp_insert_term($key, 'product_cat');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +85,26 @@ class Wiaas_Product_Category {
|
||||
return self::_get_product_category_type($product) === 'service';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if provided product is hardware
|
||||
* @param $product
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function is_hardware($product) {
|
||||
return self::_get_product_category_type($product) === 'hardware';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if provided product is software
|
||||
* @param $product
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function is_software($product) {
|
||||
return self::_get_product_category_type($product) === 'software';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// PRIVATE
|
||||
|
||||
Reference in New Issue
Block a user