=== Far LMS ===
Contributors: oriolmarches
Tags: lms, online courses, elearning, stripe, membership
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sell online courses with Stripe one-time payments and deliver them in a clean virtual classroom with student progress.

== Description ==

Far LMS turns a WordPress site into an online academy. Create your courses, sell them with a one-time Stripe payment and give each student a private dashboard and a virtual classroom to follow the lessons.

= What the free version includes =

* Course builder: courses, modules and lessons with video (YouTube, Vimeo, Wistia, Loom, Dailymotion, Streamable or your own video files), descriptions and downloadable materials.
* Virtual classroom with a modern video player, previous/next navigation, downloadable materials and lesson progress.
* Lesson search: students type a word and see which course and module each lesson is in (in the student dashboard and with the `[acad_lesson_index]` shortcode).
* Live figures for your sales pages: `[acad_figure key="lessons"]` shows how many lessons, courses, modules, materials or students you have, and updates itself when you add content.
* Resource library mode: show any course as a grid with a search box and filters (author, level, category, topic and type).
* One-time purchase per course (or of all courses) through Stripe: a Payment Link of your own or a Stripe Checkout session created with the price you set.
* Student registration, login and password recovery pages, and a private student dashboard with progress and quick access to each course.
* Student area: the classroom and the dashboard can open full screen, without your theme's header and footer (optional). Students don't see the WordPress toolbar and are sent to their dashboard if they open /wp-admin. An optional link to your community (WhatsApp, Telegram, Discord…) in the dashboard menu.
* The payment step links to your privacy policy and, if you want, to your terms and conditions page.
* Course materials stored in a protected folder and served only to students with access.
* Student management, payment history and import of students from other membership plugins.
* White-label design: your academy name, logo, colors and editable texts.
* Emails sent with WordPress (`wp_mail`), so they work with any SMTP plugin.
* Optional signed webhook to send new students to the CRM or automation tool you already use.
* Translation ready, with Catalan and Spanish translations included.

= Paid plans =

There is also a premium plugin, Far LMS Pro, sold separately. **Basic** adds recurring subscriptions (with plan changes and fair proration), discount codes, drip content, quizzes, assignments, certificates, lesson comments, progress reports, gift vouchers and short links with click counts. **Pro** adds a built-in CRM (campaigns, automations, landing pages and forms), on-site payment with a sales funnel and abandoned-payment reminders, retention tools (medals, course preview, and a cancellation flow that offers a pause or a cheaper plan before someone leaves), student documents, one-to-one classes and a REST API for your course content. **Agency** is Pro for up to 10 sites. You can try Pro for 7 days, with no card: the link on the plugin's "My plan" page opens the trial page on our website, where you get a trial key and the Pro plugin. Far LMS Pro replaces the free plugin and keeps all your data.

The free version is complete on its own: nothing in it is locked or stops working after a while, and the paid features are not included in its code.

= Shortcodes =

The plugin creates its pages on activation, so you do not need to add these by hand. They are listed here in case you want to build your own pages.

* `[acad_aula_virtual course="course-key"]` – the virtual classroom of a course.
* `[acad_dashboard]` – the student dashboard.
* `[acad_lifetime_plans]` – the one-time purchase options.
* `[acad_checkout]` – the payment step.
* `[acad_login]`, `[acad_register]`, `[acad_lost_password]`, `[acad_reset_password]` – account pages.
* `[acad_lesson_index]` – lesson search for logged-in students.
* `[acad_figure key="lessons|courses|modules|materials|students"]` – a live number for your sales pages.

== Installation ==

1. Install the plugin from Plugins → Add New, or upload the folder to `wp-content/plugins/`.
2. Activate it. The plugin creates its database tables and the pages it needs (checkout, dashboard, one-time purchase, login, registration and password recovery).
3. Go to LMS → Settings and add your Stripe keys (test keys work for trying it out) and your Stripe webhook secret. The webhook URL is shown on the same page.
4. Create your first course in LMS → Course content and set its price in LMS → One-time sale.

== Frequently Asked Questions ==

= Do I need a Stripe account? =

Yes, to take payments. Payments are processed by Stripe; the plugin never sees card details.

= Where are my API keys stored? =

In the WordPress options table (LMS → Settings), or as constants in `wp-config.php` if you prefer. They are never sent anywhere except to Stripe.

= Can I sell subscriptions with the free version? =

No. The free version sells one-time purchases: one course, or all courses, for a single payment. Recurring subscriptions are part of the Basic plan. If you already have subscribers (for example, after moving from a paid plan), the free version keeps managing them: renewals, cancellations and the Stripe customer portal keep working.

= How much does the premium version cost? =

Yearly, per license: Basic €290 (1 site), Pro €590 (1 site) and Agency €1,190 (up to 10 sites, everything in Pro). Every paid plan has a 30-day money-back guarantee. The free version costs nothing and has no time limit.

= Is anything locked or time-limited? =

No. Every feature of the free version works without a license and without an expiry date. The optional 7-day Pro trial is only started if you click the button yourself on the "My plan" page.

= Which video platforms can I use? =

YouTube (in privacy-enhanced mode), Vimeo, Wistia, Loom, Dailymotion, Streamable and your own video files (MP4, WebM, MOV and others). Paste the video link in the lesson and the classroom does the rest.

= Can I put my course pages at any address? =

Yes. Add `[acad_aula_virtual course="course-key"]` to any page; the page does not need to have the same name as the course.

= How do I show the number of lessons on my landing page? =

Use `[acad_figure key="lessons"]` (or `courses`, `modules`, `materials`, `students`). Add `floor="10"` to round down to tens (127 becomes 120), `round="50"` to round to the nearest 50, and `course="course-key"` to count a single course.

= Does it work with my theme? =

The plugin pages use their own full-width template, tested with block themes and classic themes.

= Can students keep access if I stop using a paid plan? =

Yes. Courses, students and their access are stored on your site and are not removed.

== Screenshots ==

1. A lesson in the virtual classroom: video player, previous and next lesson, and downloadable materials.
2. Course page with modules, sections and the lessons the student has already completed.
3. Student dashboard with progress and quick access to each course.
4. Lesson search: type a word and see where each lesson is.
5. One-time purchase page, for all courses or for a single course.
6. Course builder in the admin: modules, sections and lessons, with JSON import and export.
7. One-time sale settings and students with lifetime access.
8. Customization: colors and typography adapt to your theme, or you set them yourself.

== External services ==

This plugin connects to the following third-party services. Nothing is sent until you configure the related feature.

= Stripe =
Used to take payments. When a visitor buys a course, the plugin sends the product name, price and the buyer's email address to Stripe to create a Checkout session, or redirects to the Stripe Payment Link you entered. Stripe sends payment notifications back to your site (webhook). Requests go to `api.stripe.com` with your own Stripe keys.
Terms: https://stripe.com/legal/ssa — Privacy: https://stripe.com/privacy

= Google reCAPTCHA (optional) =
Only if you add reCAPTCHA keys in LMS → Settings. The registration page loads the reCAPTCHA script from `www.google.com`, and the plugin sends the visitor's response token and IP address to Google to verify it.
Terms: https://policies.google.com/terms — Privacy: https://policies.google.com/privacy

= Video platforms =
Lessons can embed videos you host on YouTube (privacy-enhanced `youtube-nocookie.com` mode; the player loads YouTube's IFrame API from `www.youtube.com`), Vimeo, Wistia, Loom, Dailymotion or Streamable. The player loads the video from that platform when a student opens the lesson. To show lesson thumbnails, the classroom loads the thumbnail image from `img.youtube.com` or asks Vimeo's oEmbed endpoint (`vimeo.com/api/oembed.json`) for it. No personal data is sent by the plugin; the platforms receive the usual browser request.
YouTube: https://www.youtube.com/t/terms and https://policies.google.com/privacy — Vimeo: https://vimeo.com/terms and https://vimeo.com/privacy — Wistia: https://wistia.com/terms and https://wistia.com/privacy — Loom: https://www.atlassian.com/legal/cloud-terms-of-service and https://www.atlassian.com/legal/privacy-policy — Dailymotion: https://legal.dailymotion.com/en/terms-of-use/ and https://legal.dailymotion.com/en/privacy-policy/ — Streamable: https://terms.streamable.com/ and https://terms.streamable.com/privacy-policy

= Your CRM webhook (optional) =
Only if you enter a webhook URL in LMS → Settings. When a student signs up, cancels or is removed, the plugin sends their email address, first name, last name and plan to that URL, signed with your secret. You choose the destination service and its terms apply.

== Changelog ==

= 2.3.0 =
* New name: Far LMS (slug and text domain `far-lms`).
* The paid plans are now a separate plugin, Far LMS Pro. The free plugin contains no licensing code and makes no connection to our servers.
* English is now the source language. Catalan and Spanish translations are included; any other language shows the plugin in English until it is translated.
* Lesson search for students, in the dashboard and as a shortcode.
* Student area: optional full-screen classroom and dashboard, no WordPress toolbar or /wp-admin for students, community link, and a focus outline only when using the keyboard.
* Student dashboard menu grouped into "Learn" and "My account"; the other courses open from a button in the classroom.
* Basic: certificates, quizzes and assignments, and gift vouchers have their own section in the student dashboard.
* Pro: "My progress" (next lesson and progress by module) and "My medals" (earned and almost earned) in the student dashboard.
* `[acad_figure]` shortcode: live numbers of lessons, courses, modules, materials and students for your sales pages.
* Resource library mode for any course, with search and filters.
* The payment step links to your privacy policy and optional terms page.
* Course pages can have any address: the classroom reads the course from the shortcode.
* The free version no longer shows options of paid features in the course builder, the student dashboard or the classroom.
* YouTube video titles are no longer requested from a third-party service.
* Basic: gift vouchers, short links with click counts and their own free trial, and plan changes with proration.
* Pro: cancellation flow that asks for the reason and offers a pause or a cheaper plan before cancelling.
* Pro CRM: GDPR consent with double opt-in and a log of every permission; campaigns can go only to people who said yes.
* Pro CRM: drag-and-drop email editor with blocks, reusable templates, test emails and scheduled campaigns.
* Pro CRM: segments by conditions (tags, lists, subscription, course, opens and clicks, signup date, custom fields) with AND/OR groups.
* Pro CRM: custom contact fields for forms, landing pages, segments, email variables and CSV import/export.

= 2.2.0 =
* Email settings: your own sending service (SMTP presets for Brevo, Mailgun, Amazon SES and Postmark), test email, SPF/DKIM/DMARC check and WP-Cron health.
* Pro CRM: Meta setup wizard, WhatsApp approved templates, bounce and complaint handling, CSV import/export and spam protection for forms.

= 2.1.0 =
* Free version: one-time course sales; recurring subscriptions move to the Basic plan.
* Licensing and the optional 7-day Pro trial (the trial is started by you, never automatically).
* Course materials and student files stored in a protected folder.
* Emails through `wp_mail` and an optional signed webhook for your CRM.
* Video player assets bundled with the plugin (no external CDN).
* Security and coding-standards hardening.

= 2.0.0 =
* Dynamic plans, CRM form builder, landing pages, automations and email campaigns.

= 1.0.0 =
* Initial release: subscriptions, course access, Stripe checkout and student dashboard.

== Upgrade Notice ==

= 2.1.0 =
Free version with one-time course sales, optional licensing and security hardening.
