Answer the question
In order to leave comments, you need to log in
How to change "Continue Shopping" button to "Checkout" using php for WooCommerce?
Hello.
I have code:
$titles = array_filter( $titles );
/* translators: %s: product name */
$added_text = sprintf( _n( '%s has been added to your cart.', '%s have been added to your cart.', $count, 'woocommerce' ), wc_format_list_of_items( $titles ) );
// Output success messages.
if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) {
$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 ) );
}
<a href="%s" class="button wc-forward">%s</a>
Continue shopping" the full link of the order page has been registered. Answer the question
In order to leave comments, you need to log in
I don’t know why you need php, but there is a plugin for translations and editing inscriptions. It's called Loco translate. If there is already a translation into Russian, click edit and change the inscriptions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question