Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. add_action( 'woocommerce_before_checkout_form', 'add_return_to_cart_notice_button' );
  2. function add_return_to_cart_notice_button(){
  3.  
  4. // HERE Type your displayed message and text button
  5. $message = __('Go back to the Cart page', 'woocommerce');
  6. $button_text = __('Back to Cart', 'woocommerce');
  7.  
  8. $cart_link = WC()->cart->get_cart_url();
  9.  
  10. wc_add_notice( '<a href="' . $cart_link . '" class="button wc-forward">' . $button_text . '</a>' . $message, 'notice' );
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement