June 1, 2026

What Deeply Customizing LearnPress Taught Me About 'Extending' a Plugin

Notes from rebuilding an LMS on top of LearnPress: when to override a template, when to hook instead, and how to tell the two apart before you start.

  • WordPress
  • LearnPress
  • LMS
Illustration of a course card with a checklist and a settings gear

Two ways to change a plugin’s behavior, and only one of them ages well

When you need a plugin to do something it wasn’t built for, you have two tools: hook into it, or override its templates and fight the version upgrade forever. Building a full e-learning platform on top of LearnPress — donation-based access instead of a store checkout, offline courses with their own layout, role-based visibility, a completely different account area — meant doing a lot of both, and learning the hard way which one to reach for.

The rule I landed on: if the plugin fires an action or filter at the exact point you need to change something, use it, even if it feels like more ceremony than just editing the file. If it doesn’t — if the only way to change the output is to rewrite the template — copy the template into the child theme’s override directory rather than touching plugin core, and treat that override as a liability you’re choosing to take on, not a free lunch.

Where template overrides were unavoidable

Some things simply aren’t hookable. LearnPress’s default course archive, lesson layout, and checkout page assume a store-like purchase flow — there’s no filter that turns “buy this course” into “donate to unlock this course.” For those, template overrides were the only path, and I made peace with three consequences:

  • Every LearnPress update is now a diff I have to read, not a composer update I can run blind. That’s a real, ongoing cost — I budget time for it instead of pretending it doesn’t exist.
  • I kept the override footprint as small as physically possible. A full template copy for a two-line change is a trap — six months later nobody remembers what the two lines were. I diff aggressively and comment the divergence at the top of each overridden file.
  • Business logic doesn’t live in the template. The donation flow, the access rules, the account menu changes — all of that lives in inc/ as proper hooked functions. Templates only render; they don’t decide.

The payoff

A year later, the platform has been through several LearnPress point releases without a single “the site broke after an update” incident — because the parts that change often (business rules) are decoupled from the parts that change rarely (the plugin’s own display logic), and the boundary between “ours” and “theirs” was drawn on purpose instead of by accident.