Last active
October 26, 2016 05:29
-
-
Save digitalchild/cbbb83c972aedebc51f4 to your computer and use it in GitHub Desktop.
Custom Product Fields - 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
<?php | |
// This will be available in the next version of WC Vendors Pro | |
// Input type of text on the product-edit.php template | |
WCVendors_Pro_Form_Helper::input( array( | |
'post_id' => $object_id, | |
'id' => '_wcv_custom_product_dispatch_days', | |
'label' => __( 'Dispatch Days', 'wcvendors-pro' ), | |
'placeholder' => __( '1 day', 'wcvendors-pro' ), | |
'desc_tip' => 'true', | |
'description' => __( 'The number of days to dispatch.', 'wcvendors-pro' ), | |
'type' => 'text', | |
) | |
) ); | |
// To use this in your woocommerce product template page where you want it displayed use the following | |
$dispatch_days = get_post_meta ($product_id, '_wcv_custom_product_dispatch_days', true ); | |
?> | |
<p><?php echo $dispatch_days; ?></p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment