Automattic\WooCommerce\Internal\ProductFeed\Mapping
UcpProductMapper::price
Build a price object from a Store API minor-unit amount.
Метод класса: UcpProductMapper{}
Хуков нет.
Возвращает
array.
Использование
// private - только в коде основоного (родительского) класса $result = $this->price( $amount, $currency ): array;
- $amount(разное) (обязательный)
- Amount in minor units, as the Store API formats it.
- $currency(строка) (обязательный)
- ISO 4217 currency code.
Код UcpProductMapper::price() UcpProductMapper::price WC 11.3.0
private function price( $amount, string $currency ): array {
return array(
'amount' => (int) $amount,
'currency' => $currency,
);
}