Created
November 9, 2021 06:43
-
-
Save digitalchild/184f9db890d695d8fcdfb02a351023fd to your computer and use it in GitHub Desktop.
Add inventory fields to product-simple.php template for WC Vendors Pro
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
add_action( 'wcv_after_product_simple_after', 'wcv_add_inventory_fields' ); | |
function wcv_add_inventory_fields( $object_id ){ | |
?> | |
<!-- Inventory --> | |
<div class="wcv-product-inventory inventory_product_data tabs-content" id="inventory"> | |
<?php WCVendors_Pro_Product_Form::manage_stock( $object_id ); ?> | |
<?php do_action( 'wcv_product_options_stock', $object_id ); ?> | |
<div class="stock_fields show_if_simple show_if_variable"> | |
<?php WCVendors_Pro_Product_Form::stock_qty( $object_id ); ?> | |
<?php WCVendors_Pro_Product_Form::backorders( $object_id ); ?> | |
<?php WCVendors_Pro_Product_Form::low_stock_threshold( $object_id ); ?> | |
</div> | |
<?php WCVendors_Pro_Product_Form::stock_status( $object_id ); ?> | |
<div class="options_group show_if_simple show_if_variable"> | |
<?php WCVendors_Pro_Product_Form::sold_individually( $object_id ); ?> | |
</div> | |
<?php do_action( 'wcv_product_options_sold_individually', $object_id ); ?> | |
<?php do_action( 'wcv_product_options_inventory_product_data', $object_id ); ?> | |
</div> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment