Added tabindex 1 to Add to cart notices (View cart/Continue shopping).
This commit is contained in:
parent
ac550e9d37
commit
355d95db9d
|
@ -118,9 +118,9 @@ function wc_add_to_cart_message( $products, $show_qty = false, $return = false )
|
||||||
// Output success messages.
|
// Output success messages.
|
||||||
if ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) ) {
|
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' ) );
|
$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 ) );
|
$message = sprintf( '<a href="%s" tabindex="1" class="button wc-forward">%s</a> %s', esc_url( $return_to ), esc_html__( 'Continue shopping', 'woocommerce' ), esc_html( $added_text ) );
|
||||||
} else {
|
} 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" tabindex="1" 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' ) ) {
|
if ( has_filter( 'wc_add_to_cart_message' ) ) {
|
||||||
|
|
Loading…
Reference in New Issue