Skip to content

Instantly share code, notes, and snippets.

@grola
Created February 7, 2018 18:28
Show Gist options
  • Save grola/07dc7079ac015484933e7e29f67e3345 to your computer and use it in GitHub Desktop.
Save grola/07dc7079ac015484933e7e29f67e3345 to your computer and use it in GitHub Desktop.
Woocommerce - add link to my account in minicart
<?php
add_action( 'woocommerce_widget_shopping_cart_buttons', 'studiowp_woocommerce_widget_shopping_cart_buttons', 30 );
function studiowp_woocommerce_widget_shopping_cart_buttons() {
echo '<br/>';
echo '<a href="' . esc_url( get_permalink( get_option('woocommerce_myaccount_page_id') ) ) . '" class="button my-account wc-forward">' . esc_html__( 'My Account', 'woocommerce' ) . '</a>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment