WC_Coupon::get_amount()publicWC 3.0.0

Get coupon amount.

Метод класса: WC_Coupon{}

Хуков нет.

Возвращает

Строку.

Использование

$WC_Coupon = new WC_Coupon();
$WC_Coupon->get_amount( $context );
$context(строка)
What the value is for. Valid values are 'view' and 'edit'.
По умолчанию: 'view'

Список изменений

С версии 3.0.0 Введена.

Код WC_Coupon::get_amount() WC 8.7.0

public function get_amount( $context = 'view' ) {
	return wc_format_decimal( $this->get_prop( 'amount', $context ) );
}