You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
353 B
19 lines
353 B
<?php
|
|
|
|
class WCML_Compatibility_Helper {
|
|
|
|
public static function get_product_type( $product_id ) {
|
|
|
|
if ( $terms = wp_get_object_terms( $product_id, 'product_type' ) ) {
|
|
$product_type = sanitize_title( current( $terms )->name );
|
|
} else {
|
|
$product_type = apply_filters( 'default_product_type', 'simple' );
|
|
}
|
|
|
|
return $product_type;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|