Created
February 21, 2017 18:05
Star
You must be signed in to star a gist
MT | ETP | Hides the Woo Quantity fields on the cart pages
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 | |
/** | |
* Hide the WooCommerce quantity adjustment fields on cart pages | |
*/ | |
function tribe_hide_woo_quantity_change() { | |
if ( ! is_cart() ) { | |
return; | |
} | |
$js = 'jQuery( ".cart_item input[type=number]" ).each( function(){ this.type = "hidden"; });'; | |
printf( | |
'<script type="text/javascript">%s</script>', | |
$js | |
); | |
} | |
add_action( 'wp_footer', 'tribe_hide_woo_quantity_change' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment