Last active
April 9, 2017 17:34
-
-
Save wolfhesse/086087e7926ad24b76f294a79578de0f to your computer and use it in GitHub Desktop.
uppercase 'View Cart' in woocommerce 3.0.1 to use existing translations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: wp-content/plugins/woocommerce/includes/wc-template-functions.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- wp-content/plugins/woocommerce/includes/wc-template-functions.php (date 1491756261000) | |
+++ wp-content/plugins/woocommerce/includes/wc-template-functions.php (date 1491758669000) | |
@@ -1422,7 +1422,7 @@ | |
* @subpackage Cart | |
*/ | |
function woocommerce_widget_shopping_cart_button_view_cart() { | |
- echo '<a href="' . esc_url( wc_get_cart_url() ) . '" class="button wc-forward">' . esc_html__( 'View cart', 'woocommerce' ) . '</a>'; | |
+ echo '<a href="' . esc_url( wc_get_cart_url() ) . '" class="button wc-forward">' . esc_html__( 'View Cart', 'woocommerce' ) . '</a>'; | |
} | |
} | |
Index: wp-content/plugins/woocommerce/includes/wc-cart-functions.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- wp-content/plugins/woocommerce/includes/wc-cart-functions.php (date 1491758669000) | |
+++ wp-content/plugins/woocommerce/includes/wc-cart-functions.php (date 1491758855000) | |
@@ -112,7 +112,7 @@ | |
$return_to = apply_filters( 'woocommerce_continue_shopping_redirect', wc_get_raw_referer() ? wp_validate_redirect( wc_get_raw_referer(), false ) : wc_get_page_permalink( 'shop' ) ); | |
$message = sprintf( '<a href="%s" class="button wc-forward">%s</a> %s', esc_url( $return_to ), esc_html__( 'Continue shopping', 'woocommerce' ), esc_html( $added_text ) ); | |
} else { | |
- $message = sprintf( '<a href="%s" class="button wc-forward">%s</a> %s', esc_url( wc_get_page_permalink( 'cart' ) ), esc_html__( 'View cart', 'woocommerce' ), esc_html( $added_text ) ); | |
+ $message = sprintf( '<a href="%s" class="button wc-forward">%s</a> %s', esc_url( wc_get_page_permalink( 'cart' ) ), esc_html__( 'View Cart', 'woocommerce' ), esc_html( $added_text ) ); | |
} | |
if ( has_filter( 'wc_add_to_cart_message' ) ) { | |
Index: wp-content/plugins/woocommerce/includes/class-wc-cart.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- wp-content/plugins/woocommerce/includes/class-wc-cart.php (date 1491758855000) | |
+++ wp-content/plugins/woocommerce/includes/class-wc-cart.php (date 1491758975000) | |
@@ -909,7 +909,7 @@ | |
if ( $in_cart_quantity > 0 ) { | |
/* translators: %s: product name */ | |
- throw new Exception( sprintf( '<a href="%s" class="button wc-forward">%s</a> %s', wc_get_cart_url(), __( 'View cart', 'woocommerce' ), sprintf( __( 'You cannot add another "%s" to your cart.', 'woocommerce' ), $product_data->get_name() ) ) ); | |
+ throw new Exception(sprintf('<a href="%s" class="button wc-forward">%s</a> %s', wc_get_cart_url(), __('View Cart', 'woocommerce'), sprintf(__('You cannot add another "%s" to your cart.', 'woocommerce'), $product_data->get_name()))); | |
} | |
} | |
Index: wp-content/plugins/woocommerce/includes/class-wc-frontend-scripts.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- wp-content/plugins/woocommerce/includes/class-wc-frontend-scripts.php (date 1491758855000) | |
+++ wp-content/plugins/woocommerce/includes/class-wc-frontend-scripts.php (date 1491758975000) | |
@@ -520,7 +520,7 @@ | |
return array( | |
'ajax_url' => WC()->ajax_url(), | |
'wc_ajax_url' => WC_AJAX::get_endpoint( "%%endpoint%%" ), | |
- 'i18n_view_cart' => esc_attr__( 'View cart', 'woocommerce' ), | |
+ 'i18n_view_cart' => esc_attr__('View Cart', 'woocommerce'), | |
'cart_url' => apply_filters( 'woocommerce_add_to_cart_redirect', wc_get_cart_url() ), | |
'is_cart' => is_cart(), | |
'cart_redirect_after_add' => get_option( 'woocommerce_cart_redirect_after_add' ), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment