• I noticed that this issue has been brought up before but it still exists. There might be a pattern, I’m getting that error when I enter $322.22 then $322.28 and $322.34 but not $322.40.

    • This topic was modified 2 years, 7 months ago by josiewin.
    • This topic was modified 2 years, 7 months ago by josiewin.
    • This topic was modified 2 years, 7 months ago by josiewin.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Running into the same issue. Even if I put in the step interval of .01. Apparently this plugin will only accept whole numbers when adding to the cart.

    For a quick and dirty solution that will get overwritten on an update:
    includes/wpc-core.php Line 210

    Change:
    if ( ( $woonp_min && ( $woonp_price < $woonp_min ) ) || ( $woonp_max && ( $woonp_price > $woonp_max ) ) || ( $woonp_mod != intval( $woonp_mod ) ) ) {

    To this:
    if ( ( $woonp_min && ( $woonp_price < $woonp_min ) ) || ( $woonp_max && ( $woonp_price > $woonp_max ) ) || ( !is_float($woonp_mod) ) ) {

    then save the file. It changes the check, if not a whole number: $woonp_mod != intval( $woonp_mod ) to if not a float number (whole or number with decimal).

    I didn’t look through the rest of the code but this change fixed it for me so I can have numbers like 100.01 or 100.

Viewing 1 replies (of 1 total)
  • The topic ‘Invalid price. Please try again!’ is closed to new replies.