Last active
October 20, 2015 07:21
-
-
Save digitalchild/cb49e3dfd04b67450d2c to your computer and use it in GitHub Desktop.
WC Vendors Pro - Force simple product and downloadable / virtual
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Adjust the following in your product-edit.php template | |
// Remove this from lines 50 to 55 in product-edit.php | |
// <div class="all-100"> | |
// <!-- Product Type --> | |
// <div class="wcv-product-type"> | |
// <?php WCVendors_Pro_Product_Form::product_type( $object_id ); ?> | |
// </div> | |
// </div> | |
// | |
// | |
// Add the following in its place, remember to keep the php tags | |
?> | |
<!-- Product Type --> | |
<?php | |
//Product Type | |
WCVendors_Pro_Form_Helper::input( array( | |
'post_id' => $object_id, | |
'type' => 'hidden', | |
'id' => 'product-type', | |
'value' => 'simple', | |
'show_label' => false | |
) | |
); | |
// Virtual Product | |
WCVendors_Pro_Form_Helper::input( array( | |
'post_id' => $object_id, | |
'type' => 'hidden', | |
'id' => '_virtual', | |
'value' => 'yes', | |
'show_label' => false | |
) | |
); | |
// Downloadable Product | |
WCVendors_Pro_Form_Helper::input( array( | |
'post_id' => $object_id, | |
'type' => 'hidden', | |
'id' => '_downloadable', | |
'value' => 'yes', | |
'show_label' => false | |
) | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment