How do I prefill the price field in the woo-commerce edit product page?
The price fields, I want to prefill are (Minimum) & (Maximum) price fields. These fields are generated by the "Name your price" plugin from WooCommerce.
The label for minimum price is _min_price
The label for the maximum price is _maximum_price
I want the "Minimum Price" field to be prefilled with "10" & the "Maximum Price" field should be "250"
I've tried using the following code, but it didn't work.
add_action( 'woocommerce_product_options_general_product_data',
'prefill_min_max' );
function prefill_min_max(){
?>
<script>
(function($){
$('input[name=_min_price]').val('10');
$('input[name=_maximum_price]').val('250');
})(jQuery);
</script>
<?php
}
