Skip to content

Instantly share code, notes, and snippets.

@gsibert
gsibert / LearnDash Profile to My Account
Last active Feb 25, 2021 — forked from danielmcclure/functions.php
Add LearnDash Enrolled Courses Grid to My Account Tab in WooCommerce
View LearnDash Profile to My Account
/* Add LearnDash Profile to My Account Tab in WooCommerce */
/* Add Courses Link to My Account menu */
add_filter ( 'woocommerce_account_menu_items', 'wc_ld_link', 40 );
function wc_ld_link( $menu_links ){
$menu_links = array_slice( $menu_links, 0, 5, true )
+ array( 'courses' => 'My Courses' )
+ array_slice( $menu_links, 5, NULL, true );
return $menu_links;