Last active
May 5, 2018 13:05
-
-
Save kartikparmar/008ceb9cea3f7c7bd0b8117d22de063b to your computer and use it in GitHub Desktop.
Adding button on mini cart.
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
<?php | |
/** | |
* Adding button to mini cart. | |
*/ | |
function woocommerce_widget_shopping_cart_buttons_callback() { | |
echo '<a href="' . esc_url( wc_get_checkout_url() ) . '" class="button wc-forward x-anchor">'. esc_html__( 'Submit Order', 'woocommerce' ) .'</a>'; | |
} | |
add_action( 'woocommerce_widget_shopping_cart_buttons', 'woocommerce_widget_shopping_cart_buttons_callback', 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, thought for a long time how to do this