Skip to content

Commit

Permalink
Fix notice when has not a property ID
Browse files Browse the repository at this point in the history
  • Loading branch information
gine committed Jan 29, 2017
1 parent 999f233 commit a940eef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/js/ipq_input_value_validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jQuery(document).ready( function($) {
* If user enters a value that is out of bounds,
* it will be auto corrected to a valid value.
*/
$(document).on('change', '.qty', function(e) {
$(document).on('change input', '.qty', function(e) {
var $input = $(e.currentTarget);
// Get values from input box
var step = $input.attr( 'step' );
Expand Down
4 changes: 3 additions & 1 deletion includes/wcqu-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@ function wcqu_get_value_from_rule( $type, $product, $rule ) {

// Return Values from the Rule based on $type requested
} else {

if($rule == null || ! property_exists($rule, 'ID'))
return null;

switch ( $type ) {
case 'all':
//TODO: why get all and filter array?
Expand Down

0 comments on commit a940eef

Please sign in to comment.