Skip to content

Commit

Permalink
Normalize the "Read more" button text, closes woocommerce#11319
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiosanches committed Jun 30, 2016
1 parent 57ac24a commit 08f9548
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion includes/class-wc-embed.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static function product_buttons() {
$buttons[] = sprintf( $button, esc_url( add_query_arg( 'add-to-cart', get_the_ID(), wc_get_cart_url() ) ), esc_html__( 'Buy Now', 'woocommerce' ) );
}

$buttons[] = sprintf( $button, get_the_permalink(), esc_html__( 'Read More', 'woocommerce' ) );
$buttons[] = sprintf( $button, get_the_permalink(), esc_html__( 'Read more', 'woocommerce' ) );

return '<p>' . implode( ' ', $buttons ) . '</p>';
}
Expand Down
2 changes: 1 addition & 1 deletion includes/class-wc-product-simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function add_to_cart_url() {
* @return string
*/
public function add_to_cart_text() {
$text = $this->is_purchasable() && $this->is_in_stock() ? __( 'Add to cart', 'woocommerce' ) : __( 'Read More', 'woocommerce' );
$text = $this->is_purchasable() && $this->is_in_stock() ? __( 'Add to cart', 'woocommerce' ) : __( 'Read more', 'woocommerce' );

return apply_filters( 'woocommerce_product_add_to_cart_text', $text, $this );
}
Expand Down
2 changes: 1 addition & 1 deletion includes/class-wc-product-variable.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct( $product ) {
* @return string
*/
public function add_to_cart_text() {
$text = $this->is_purchasable() && $this->is_in_stock() ? __( 'Select options', 'woocommerce' ) : __( 'Read More', 'woocommerce' );
$text = $this->is_purchasable() && $this->is_in_stock() ? __( 'Select options', 'woocommerce' ) : __( 'Read more', 'woocommerce' );

return apply_filters( 'woocommerce_product_add_to_cart_text', $text, $this );
}
Expand Down
2 changes: 1 addition & 1 deletion includes/class-wc-product-variation.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function add_to_cart_url() {
* @return string
*/
public function add_to_cart_text() {
$text = $this->is_purchasable() && $this->is_in_stock() ? __( 'Add to cart', 'woocommerce' ) : __( 'Read More', 'woocommerce' );
$text = $this->is_purchasable() && $this->is_in_stock() ? __( 'Add to cart', 'woocommerce' ) : __( 'Read more', 'woocommerce' );

return apply_filters( 'woocommerce_product_add_to_cart_text', $text, $this );
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit-tests/product/product-simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function test_add_to_cart_text() {
$this->assertEquals( __( 'Add to cart', 'woocommerce' ), $product->add_to_cart_text() );

$product->stock_status = 'outofstock';
$this->assertEquals( __( 'Read More', 'woocommerce' ), $product->add_to_cart_text() );
$this->assertEquals( __( 'Read more', 'woocommerce' ), $product->add_to_cart_text() );

// Delete product
WC_Helper_Product::delete_product( $product->id );
Expand Down

0 comments on commit 08f9548

Please sign in to comment.