Created
May 4, 2015 09:07
-
-
Save woogist/20e3068c0fc5be376fcd to your computer and use it in GitHub Desktop.
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
if ( ! is_shop() && ! is_product_taxonomy() ) { | |
$quantity_field = woocommerce_quantity_input( array( | |
'input_name' => 'product_id', | |
'input_value' => ! empty( $product->cart_item['quantity'] ) ? $product->cart_item['quantity'] : 0, | |
'max_value' => $product->backorders_allowed() ? '' : $product->get_stock_quantity(), | |
'min_value' => 0, | |
), $product, false ); | |
$quantity_field = str_replace( array( '<div class="quantity">', "</div>" ), '', $quantity_field ); | |
echo str_replace( '<input ', '<input style="max-width: 70px" ', $quantity_field ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment