Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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