WC_Product::set_sale_price()
Set the product's sale price.
Метод класса: WC_Product{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WC_Product = new WC_Product(); $WC_Product->set_sale_price( $price );
- $price(строка) (обязательный)
- sale price.
Список изменений
С версии 3.0.0 | Введена. |
Код WC_Product::set_sale_price() WC Product::set sale price WC 9.7.1
public function set_sale_price( $price ) { $this->set_prop( 'sale_price', wc_format_decimal( $price ) ); }