My courses endpoint integration

Working with the My courses area in the WooCommerce account.

What it is

A WooCommerce account endpoint added by POM LMS, inserted into the account menu after its first entry. Its label and URL segment are configurable in the plugin settings.

It requires WooCommerce. Without it, there is no account area and no endpoint.

What it renders

One row per course the current user can access, built by checking every course against the access helpers. Each row shows the course thumbnail, its title, the completion percentage, the reason access was granted, and a link into the course.

The filtering is the important part for integrators: inaccessible courses are absent, not disabled. If you are building something that mirrors this list, reproduce that behavior rather than showing locked rows.

Building your own course list

The supported way is the helpers, not the endpoint's internals:

$courses = get_posts( [
    'post_type'      => 'course',
    'posts_per_page' => -1,
    'fields'         => 'ids',
] );

$accessible = array_filter( $courses, 'pom_lms_user_can_access_course' );

foreach ( $accessible as $course_id ) {
    $percent = pom_lms_get_course_completion( $course_id );
    // Render.
}

That is the whole recipe. A dashboard widget, a shortcode, a themed page — all of them are this loop with different markup.

Be aware of the cost: a paid course means a purchase check per course. On a large catalogue, that loop is not free.

Changing the endpoint's URL

The slug is a setting. Changing it requires the permalink rules to be rebuilt, which happens when the permalink screen is saved.

If your integration links to the endpoint, do not hard-code the path — resolve the account URL through WooCommerce so your links follow the configured slug.

The texts

The menu label, the course column heading and the empty-state message are settings, and they are translatable. Read them from the settings rather than reproducing the defaults in your own code, or a site that has customized them will show two different labels.

Access reasons

The endpoint states why each course is available: a subscription, a purchase, a permission rule, or that the course is free. The two purchase cases link to the product.

These strings are not configurable. If you are building a parallel view and want the same information, pom_lms_user_purchased_course() returns the product that granted access, which is what the purchase cases are built from. See The purchase access helper.

What the endpoint does not offer

  • No unenrol or remove action.
  • No order or receipt information — that is WooCommerce's own account pages.
  • No certificates or downloads.
  • No history of courses whose access has ended. Lapsed access simply removes the row.

That last point is worth designing around: if your site needs students to see courses they used to have, that view is yours to build, and it needs its own record of who had what.

Sites without WooCommerce

The endpoint does not exist, but courses do, and the access helpers work exactly the same — a course gated by a permission rule needs no shop at all.

On such a site, build the course list above into a page of your own, and link it from the menu.