Skip to content

Instantly share code, notes, and snippets.

@kartikparmar
Last active May 5, 2018 13:05
Show Gist options
  • Save kartikparmar/008ceb9cea3f7c7bd0b8117d22de063b to your computer and use it in GitHub Desktop.
Save kartikparmar/008ceb9cea3f7c7bd0b8117d22de063b to your computer and use it in GitHub Desktop.
Adding button on mini cart.
<?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 );
@VladKo0078
Copy link

Thanks, thought for a long time how to do this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment