Update "Add to cart" aria-label value so it matches the visible text pattern (#41389)
Fixes #41368
This commit is contained in:
commit
aabee87c67
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: update
|
||||||
|
|
||||||
|
Add to cart button aria-label text should match or use similar text pattern as the visible text
|
|
@ -70,7 +70,7 @@ class WC_Product_Simple extends WC_Product {
|
||||||
*/
|
*/
|
||||||
public function add_to_cart_description() {
|
public function add_to_cart_description() {
|
||||||
/* translators: %s: Product title */
|
/* translators: %s: Product title */
|
||||||
$text = $this->is_purchasable() && $this->is_in_stock() ? __( 'Add “%s” to your cart', 'woocommerce' ) : __( 'Read more about “%s”', 'woocommerce' );
|
$text = $this->is_purchasable() && $this->is_in_stock() ? __( 'Add to cart: “%s”', 'woocommerce' ) : __( 'Read more about “%s”', 'woocommerce' );
|
||||||
|
|
||||||
return apply_filters( 'woocommerce_product_add_to_cart_description', sprintf( $text, $this->get_name() ), $this );
|
return apply_filters( 'woocommerce_product_add_to_cart_description', sprintf( $text, $this->get_name() ), $this );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue