public function is_bulk_variation_form()
{
global $post;
if (!$post) {
return false;
}
/** Remove validation (_bv_type) -- 03/02/2016 **/
if (!is_product()) {
return false;
}
/****/
/** Validate if exits role -- 03/02/2016 **/
if ($this->role_exists('wholesale_customer')) {
if (!current_user_can('wholesale_customer')) {
return false;
}
}
// 2.0 Compat
if (function_exists('get_product')) {
$product = get_product($post->ID);
} else {
$product = new WC_Product($post->ID);
}
if ($product && !$product->has_child() && !$product->is_type('variable')) {
return false;
}
return apply_filters('woocommerce_bv_render_form', true);
}