Created
December 8, 2015 01:48
-
-
Save digitalchild/b8cb082f777afa50580f to your computer and use it in GitHub Desktop.
Price Dropdown
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 | |
//Replace the following lines from the product-edit.php template | |
<!-- Price --> | |
<?php //WCVendors_Pro_Product_Form::price( $object_id ); ?> | |
<!-- Sale Price --> | |
<?php //WCVendors_Pro_Product_Form::sale_price( $object_id ); ?> | |
// | |
/// WITH THE BELOW | |
// Price drop down | |
WCVendors_Pro_Form_Helper::select( array( | |
'post_id' => $object_id, | |
'id' => '_regular_price', | |
'label' => __( 'Price', 'wcvendors-pro' ), | |
'wrapper_start' => '<div class="all-100">', | |
'wrapper_end' => '</div>', | |
'options' => array( | |
'1' => __( '$1.00', 'wcvendors-pro' ), | |
'2' => __( '$2.00', 'wcvendors-pro' ), | |
'3' => __( '$3.00', 'wcvendors-pro' ) | |
), | |
) | |
); | |
// store empty sale price (required) | |
WCVendors_Pro_Form_Helper::input( array( | |
'id' => '_sale_price', | |
'type' => 'hidden', | |
'value' => '', | |
) | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment