2017-02-01 10 views

答えて

5

あなたは、おそらく最も完全である彼らのヘルパー関数を使用することができます。

if(class_exists('WC_Subscriptions_Product') && WC_Subscriptions_Product::is_subscription($product)) { 
    return TRUE; 
} else { 
    return FALSE; 
} 

それとも、またWooCommerceの$product->is_type($type)チェックを使用することができます。

関連する問題