Automattic\WooCommerce\Blocks\BlockTypes
SavedForLater::render_ssr_quantity
SSR-mode markup for the quantity span. SFL-specific.
Метод класса: SavedForLater{}
Хуков нет.
Возвращает
string.
Использование
// private - только в коде основоного (родительского) класса $result = $this->render_ssr_quantity( $item ): string;
- $item(array<string, mixed>) (обязательный)
- Schema-shape item.
Код SavedForLater::render_ssr_quantity() SavedForLater::render ssr quantity WC 11.3.0
private function render_ssr_quantity( array $item ): string {
$quantity = (int) ( $item['quantity'] ?? 1 );
$quantity_label = sprintf( $this->get_quantity_label_template(), $quantity );
return sprintf(
'<span class="%s__quantity">%s</span>',
esc_attr( ShopperListRenderer::ROW_CLASS ),
esc_html( $quantity_label )
);
}