Ensure coupon amount is always a float value

Closes #19889
This commit is contained in:
Claudio Sanches 2018-04-27 18:03:04 -03:00
parent 96c538bf4a
commit 877cc29604
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ class WC_Coupon extends WC_Legacy_Coupon {
* @return float * @return float
*/ */
public function get_amount( $context = 'view' ) { public function get_amount( $context = 'view' ) {
return $this->get_prop( 'amount', $context ); return (float) $this->get_prop( 'amount', $context );
} }
/** /**