search expand
Skip to content
Careless Dev

Careless Dev

  • Home
  • WordPress
  • WooCommerce

Show LearnDash enrolled courses on WooCommerce My Account page

Posted in WooCommerce

Updated on April 6, 2022

We can easily show enrolled courses of current logged in users using the ld_profile shortcode of LearnDash. We can use this shortcode in WooCommerce My Account (user dashboard) page as well.

The ld_profile shortcode is actually to show user profile, which contains all enrolled courses with progress. This shortcode will output many useful information including user avatar, name, total number of courses enrolled, courses completed, number of certificate earned, list of enrolled courses with ability to search course, course progress, links to download certificates, quizzes taken etc. ld_profile shortcode has few parameters as well. Full ld_profile documentation is available here.

So how do we use this easily on WooCommerce my account page/user dashboard? We can use the woocommerce_account_dashboard action hook to display above shortcode. This will display user profile after texts on my account page.

function careless_display_learndash_user_profile() {
    echo '<h1 class="entry-title dashboard-ld-courses">' . __( 'Enrolled Courses', 'woocommerce' ) .'</h1>';
    echo do_shortcode('[ld_profile course_points_user="no" show_search="no"]' );
}
add_action( 'woocommerce_account_dashboard', 'careless_display_learndash_user_profile' );

Above code will display user profile without the course points and search form.

Code goes in the functions.php file of your active theme.

Posted on December 31, 2021Tagged add_action, ld_profile, learndash, woocommerce_account_dashboard

Post navigation

Previous PostRemove HTML tags from WordPress comments
Next PostCreate an email sending form in WordPress admin using Advanced Custom Fields (ACF)

Recent Posts

  • Make display name not-required on WooCommerce account edit page
  • Limit excerpt length for posts from specific category or taxonomy
  • Don’t redirect to WooCommerce product single page after “add-to-cart” error
  • Add new WooCommerce checkout field
  • Update shipping fee on state and postcode change on WooCommerce checkout page

Friendly Tags

acf add_action admin_head admin_notices advanced custom field billing_postcode checkout fields core_update_footer current_user_can do_shortcode flush_rules free_shipping get_bloginfo get_cart get_current_screen get_field get_the_excerpt has_term init is_in_stock is_main_query is_search is_wp_error learndash manage_options method_id Paid Membership Pro permalink PMPro pre_get_posts remove_filter search shipping_postcode template_redirect the_excerpt update_footer wc_get_page_permalink woocommerce_before_shop_loop_item_title woocommerce_checkout_fields woocommerce_email_order_items_args woocommerce_package_rates woocommerce_thankyou wp_footer wp_head wp_rewrite
©2026 careless.dev All Rights Reserved.
Web Hosting powered by DCT IT.
Privacy Policy | Contact Us