parameter('duration') == $duration && $this->parameter('duration_unit') === $unit) { $this->message = 'This product cannot have a price variation for the same duration and duration unit values as the product itself.'; return false; } // end if; /** * Validation Amount */ $amount = wu_get_isset($price_variation, 'amount', false); if ($amount) { $amount = wu_to_float($amount); } // end if; if (!is_numeric($amount)) { return false; } // end if; } // end foreach; return true; } // end check; } // end class Price_Variations;