Home / Admin / Force product type for all products
Duplicate Snippet

Embed Snippet on Your Site

Force product type for all products

Code Preview
php
<?php
// Disable the product type drop down. 
add_filter('wcv_disable_product_type', function() { return true; } );
/**
 * Hook into the form and output a hidden field that sets the product type. 
 */
add_action( 'wcv_after_product_type', 'wcv_set_product_type' ); 
function wcv_set_product_type( $object_id ){ 
	WCVendors_Pro_Product_Form::product_type_hidden( $object_id, 'appointment' );
}

Comments

Add a Comment