Skip to content

Instantly share code, notes, and snippets.

@digitalchild
Created December 8, 2015 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitalchild/b8cb082f777afa50580f to your computer and use it in GitHub Desktop.
Save digitalchild/b8cb082f777afa50580f to your computer and use it in GitHub Desktop.
Price Dropdown
<?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