Skip to content

Instantly share code, notes, and snippets.

@tamarazuk
Created June 8, 2015 17:56
Show Gist options
  • Save tamarazuk/ab4442be037db142e372 to your computer and use it in GitHub Desktop.
Save tamarazuk/ab4442be037db142e372 to your computer and use it in GitHub Desktop.
Measurement Price Calculator: Set step increment for user-defined measurements
function sv_wc_measurement_price_calculator_amount_needed() {
wc_enqueue_js( '
$( "input.amount_needed" ).attr( { "step" : "0.1", "type" : "number" } );
' );
}
add_action( 'wp_enqueue_scripts', 'sv_wc_measurement_price_calculator_amount_needed' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment