Automattic\WooCommerce\Blocks\BlockTypes\AddToCartWithOptions

GroupedProductItemSelector::remove_quantity_label │ private │ WC 1.0

Removes the label from quantity input HTML.

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

Хуков нет.

Возвращает

string. The quantity input HTML without the label.

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

// private - только в коде основоного (родительского) класса
$result = $this->remove_quantity_label( $quantity_html );
$quantity_html(строка) (обязательный)
The quantity input HTML.

Код GroupedProductItemSelector::remove_quantity_label() WC 11.2.1

private function remove_quantity_label( $quantity_html ) {
	// Remove the label and aria-label from the quantity input.
	$quantity_html = preg_replace( '/<label[^>]*>.*?<\/label>/s', '', $quantity_html );
	return preg_replace( '/\s*aria-label="[^"]*"/', '', $quantity_html );
}