=== Acatudy ===
Contributors: acatudy
Tags: lms, online courses, tutoring, test prep, pricing table
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.1.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sell your Acatudy courses on WordPress: pricing tables, course catalog, Buy now with Stripe, student sign-up and single sign-on to your classroom.

== Description ==

**Acatudy** is software for tutoring and test prep centers: courses, practice tests, Exams, flashcards and student progress in one online classroom. This plugin turns your WordPress website into the shop window of your academy: visitors discover your courses, compare plans, buy and sign up on your own site, and then continue to your Acatudy classroom.

Your WordPress site stays your marketing site. The classroom, the students and the payments stay in Acatudy.

**This plugin is the connector for an external service.** Acatudy is a Software as a Service (SaaS): you need an Acatudy academy (there is a free plan) and a connection key to use it. The plugin sends nothing until an administrator pastes that key. The section "External services" below lists every request, the data it carries and when it is sent. Acatudy [Terms of Service](https://acatudy.com/legal/terms) and [Privacy Policy](https://acatudy.com/legal/privacy).

= Sell from your own site =

* **Buy now** opens a clean, accessible checkout window on your page: the buyer types their email and continues to a secure Stripe payment page of your academy.
* After paying, buyers land on your **Welcome** page, which confirms the payment and takes them to the classroom. Acatudy emails them their access.
* Clear messages when something blocks the purchase (for example, "You already have this plan. Log in to your classroom.").
* No payment ever happens inside WordPress and the plugin never sees card details.

= Pricing tables in 10 designs =

Cards, Spotlight, Comparison, Minimal, Bold, Glass, Horizontal list, Tabs, Dark and Compact. All of them support your colors, corner radius and typography, the monthly / yearly switch with the savings, plan benefits, the recommended plan, sale prices, free trials and Buy now. The buttons use the words of each plan ("Start your 7-day free trial", "Subscribe", "Buy now").

= Course catalog in 4 designs =

Grid, List, Carousel (accessible, no heavy libraries) and Featured.

= Course pages for search engines =

* One page per active course on your site, with cover, description, syllabus, teachers, hours, the plans that include it and Buy now.
* Synced every hour, with a "Sync now" button. Courses that are no longer active are unpublished, never deleted.
* schema.org Course structured data with offers. Works with SEO plugins like any other page.
* Works with block themes (it registers its own template) and classic themes. Templates can be overridden from your theme.

= Single sign-on to the classroom =

* Students who are logged in on your site click "Go to my classroom" and land in their classroom without typing their password again.
* Administrators can open the Acatudy dashboard from WordPress (with two-step verification).
* Both are off until you turn them on in Acatudy.

= Built for WordPress =

* Setup wizard: connect, choose your style with a live preview and create the Courses, Pricing, Sign up and Welcome pages in one click.
* Blocks with a visual design picker, block patterns (hero, catalog, pricing with FAQ, final call to action), shortcodes, a classic widget and Elementor widgets.
* A "Classroom" link for menus and the Navigation block.
* Native sign-up form: students create their account and get an email to set their password.
* Admin dashboard with students, sales of the last 12 months, latest sign-ups and purchases, and "Add a student".
* Responsive and accessible (keyboard, focus, screen readers, contrast). Available in English, Spanish, French and Italian.
* Fast: data is cached, and the CSS and JavaScript load only on pages that use the blocks.
* Resilient: if your classroom can not be reached, visitors never see errors.

= Requirements =

An Acatudy academy. You can create one at [acatudy.com](https://acatudy.com).

== External services ==

This plugin connects to **Acatudy** (https://acatudy.com), the service where your academy, courses and students live. It does not contact any service until an administrator pastes a connection key in Acatudy → Settings. It sends no tracking or usage data.

**Acatudy API (https://acatudy.com/api/v1)**

Every request carries the connection key (`Authorization` header), the address of the site and plugin version (`User-Agent` header) and the site language (`Accept-Language` header).

* `GET /site`, `GET /catalog`, `GET /courses/{id}`: academy details, active courses, plans for sale and public course details. Sent when an administrator connects or refreshes the plugin, when the hourly course sync runs, and when a page with an Acatudy block is viewed and the cached data (10 minutes) has expired. The preferred language (`en` or `es`) is sent with the catalog.
* `GET /summary`: figures for the plugin dashboard. Only when an administrator opens it.
* `POST /users`: when an administrator uses "Add a student", or a visitor submits the sign-up form. Sends the student's name and email address. Acatudy emails them a link to create their password.
* `POST /checkout`: when a visitor confirms a purchase in the Buy now window. Sends the plan, billing period, the buyer's email address and optional name, the buyer's IP address (for fraud prevention and to decide the consumer withdrawal rules of their country), the buyer's country when the site's CDN provides it, the site language, whether the buyer accepted the immediate-access condition, and the return addresses of the site. Acatudy answers with the address of a Stripe Checkout page of the academy.
* `GET /checkout/{session}`: when the buyer lands on the Welcome page, to show whether the payment was completed. Sends only the payment session id.
* `POST /sso/tickets` (single sign-on, only if your academy turned it on in Acatudy): when a logged-in user clicks "Go to my classroom" or a "Classroom" menu link, or an administrator clicks "Open Acatudy dashboard". Sends that user's email address, their WordPress user id and username and the site address (so Acatudy can ask them once, by email, to confirm the account is theirs) and the classroom page to open. Acatudy answers with a one-time address that works once, for one minute; the user's browser is sent there. The first time, the browser goes through a confirmation page of the classroom instead, and the email link only works in that browser. No password is sent or stored.

**Your academy classroom (for example https://yourschool.acatudy.com or your own domain)**

* Course cover images are loaded by the visitor's browser from your classroom.
* If you choose the "Live widget" display mode, the widgets are loaded inside iframes from your classroom. The script that creates them is included in this plugin.
* Buttons link to your classroom; visitors only go there when they click them.

**Stripe (https://stripe.com)**

* After confirming a purchase, the buyer's browser is sent to a Stripe Checkout page of the academy. The plugin itself never connects to Stripe. [Stripe Privacy Policy](https://stripe.com/privacy).

Acatudy [Terms of Service](https://acatudy.com/legal/terms) and [Privacy Policy](https://acatudy.com/legal/privacy).

== Installation ==

1. Install the plugin from **Plugins → Add New Plugin** (search for "Acatudy") or upload the `acatudy` folder to `/wp-content/plugins/`, and activate it. The setup wizard opens.
2. In Acatudy, open **Academy settings → API tokens → Connect WordPress** and click **Create WordPress key**. Copy the key (it is shown only once).
3. Paste it in the wizard and click **Test connection**.
4. Choose your colors and pricing design, and create your Courses, Pricing, Sign up and Welcome pages in one click.
5. Optional: add the pricing, course catalog or "Go to my classroom" blocks to any page, and turn on single sign-on in Acatudy.

The full guide is in **Acatudy → Help** inside WordPress.

== Frequently Asked Questions ==

= Do I need an Acatudy account? =

Yes. The plugin shows and sells the courses and plans of your Acatudy academy, so it needs an academy and a connection key. Create your academy at https://acatudy.com; there is a free plan. The plugin itself is free.

= How do payments work? =

Students pay on a secure Stripe Checkout page of your academy, which is connected to Acatudy through Stripe Connect, so the money goes to your own Stripe account (minus the Acatudy platform fee, if your plan has one). No payment happens inside WordPress and the plugin never handles card details. After paying, Acatudy emails the student right away: new students get a link to create their password, and students who already had an account find the new plan in their classroom.

= Why do I see "Powered by Acatudy"? =

The Free and Basic Acatudy plans require the badge. The plugin never shows it without your permission: it is off by default, and you turn it on once in the setup wizard or in Acatudy → Settings. After that it follows your plan on its own (it disappears on Pro and Institutional and comes back if you move back to Free or Basic). If your plan requires it and you leave it off, your blocks load as live widgets from Acatudy (which carry the badge) instead of native HTML.

= Can the classroom use my own domain? =

Yes, if your Acatudy plan includes a custom domain. Set it up in Acatudy; the plugin reads the classroom address from your academy, so buttons, menu links and single sign-on follow the new domain without any change in WordPress.

= How does single sign-on work? =

Turn it on in Acatudy (Academy settings → API tokens → Single sign-on) and click "Add single sign-on to my WordPress keys". Then add the "Go to my classroom (Acatudy)" block, the `[acatudy_classroom_button]` shortcode or the "Classroom" menu link. Students who are logged in on your site go straight to their classroom; the first time, Acatudy emails them a link to confirm that the WordPress account is theirs. Students who belong to more than one academy and visitors who are not logged in use the normal login page. Administrators with two-step verification on can open the Acatudy dashboard from Acatudy → Single sign-on; Acatudy still asks for the emailed code.

= Can I change the design, or use Elementor and other page builders? =

Yes. Choose between 10 pricing designs and 4 catalog designs, your colors, corner radius and typography in Acatudy → Appearance, or per block. With Elementor you get Acatudy widgets; with other builders, use the shortcodes `[acatudy_courses]`, `[acatudy_plans]`, `[acatudy_access]`, `[acatudy_signup]`, `[acatudy_welcome]` and `[acatudy_classroom_button]`. Developers can override the templates by copying them to `yourtheme/acatudy/` and use the filters `acatudy_api_base` (or the `ACATUDY_API_BASE` constant), `acatudy_widget_config`, `acatudy_widget_html`, `acatudy_checkout_args`, `acatudy_client_ip`, `acatudy_buyer_country`, `acatudy_trusted_proxies`, `acatudy_payment_hosts` and `acatudy_template`.

= Is it GDPR friendly? What does the plugin store? =

The plugin adds no cookies, no analytics and no tracking. In WordPress it stores its settings, the connection key (not autoloaded and never shown in full), a short-lived cache of your academy data, the synced course pages, rate-limit counters keyed by a salted hash of the visitor's IP address (one hour at most) and the payment status shown on the Welcome page (ten minutes at most). Personal data such as names and email addresses is sent to Acatudy only when a person signs up, buys or uses single sign-on, as listed in "External services". The plugin adds a suggested paragraph to Settings → Privacy for your privacy policy.

= Which languages are included? =

English, Spanish, French and Italian, for the admin screens and for everything your visitors see. Texts that come from Acatudy, such as plan names and course descriptions, are shown in the language of your academy.

= What happens when I uninstall the plugin? =

Deactivating stops the course sync. Deleting the plugin removes its settings, the connection key, the cached data, the scheduled task and the synced course pages, on every site of a multisite network. The pages you created with the setup wizard stay, because they are yours. Your academy, students and payments in Acatudy are not touched.

= My connection key expired, or I use a page cache. What should I know? =

Keys expire after one year or when revoked. Visitors simply stop seeing the blocks and administrators get a notice: create a new WordPress key in Acatudy and paste it in **Acatudy → Settings**. Page caches are fine: the forms renew their security token when needed and the Welcome page is never cached.

== Screenshots ==

1. Settings: the connection to your Acatudy academy, selling status and how blocks are shown.
2. Home: students, sales of the last 12 months and the pages of your site at a glance.
3. Appearance: pick one of the 10 pricing designs and see your plans change live.
4. The pricing block on your site (Spotlight design) with the monthly / yearly switch and a free trial.
5. The Comparison pricing design: every benefit and course, side by side.
6. The Dark pricing design.
7. The course catalog block (Grid design) with covers, hours and prices.
8. Single sign-on: students go from your site to their classroom without typing their password again.
9. The Acatudy blocks and patterns in the block editor.

== Changelog ==

= 2.1.4 =
* Pricing buttons use the words Acatudy sends for each plan ("Start your 7-day free trial", "Subscribe", "Buy now") with the price charged after the trial, in your site language. No trial text is shown when the plan has no free trial.
* Clear messages when Acatudy asks to wait (too many sign-ups, purchases or classroom sign-ins): what happened and how long to wait, in your site language.
* "Go to my classroom": people whose Acatudy account also belongs to another academy are told to accept the emailed invitation and then sign in with their email and password.
* Requests to Acatudy now carry the site language (Accept-Language).

= 2.1.3 =
* Security: the sign-up and purchase forms refuse requests that the browser marks as coming from another site (Sec-Fetch-Site), and the sign-ups of the whole site are limited to 30 per hour.
* Security: "My site is behind Cloudflare or a proxy" only reads the visitor address and country from Cloudflare's own IP addresses. For any other proxy or load balancer, list its IP addresses in Settings → Advanced (or use the `acatudy_trusted_proxies` filter); the same headers sent by anyone else are ignored.

= 2.1.2 =
* Added French and Italian translations (the plugin now speaks English, Spanish, French and Italian).

= 2.1.1 =
* Security: adding someone whose email already has an Acatudy account in another academy now sends them an invitation; they join your academy only when they accept it.
* Acatudy now checks "Create students from WordPress" and open sign-ups on its side too, not only in the plugin.

= 2.1.0 =
* New: single sign-on. "Go to my classroom" (block, shortcode `[acatudy_classroom_button]`, classic widget and the "Classroom" menu link) takes logged-in students straight to their Acatudy classroom with a one-time pass. Off until the academy turns it on in Acatudy.
* New: the first time, Acatudy emails the student a link to confirm that the WordPress account is theirs. If the academy allows it, people who are not students yet get their account created and an email to set their password.
* New: "Open Acatudy dashboard" for WordPress administrators whose email is an Acatudy admin of the academy with two-step verification on. Acatudy still asks for the emailed code.
* New: Single sign-on screen with the status in Acatudy, the options of this site and where to add the button.

= 2.0.0 =
* New: sell from your site with Buy now and a Welcome page after paying.
* New: course pages synced every hour, with structured data.
* New: 10 pricing designs, 4 catalog designs and a visual design picker.
* New: setup wizard, native sign-up form, block patterns, menu link and Elementor widgets.
* New: admin area with Home (12-month sales chart), Appearance, Pages, Settings and Help.
* Changed: "Add a student" always emails the student a link to create their password; no passwords are shown.
* Changed: the live widget script is bundled with the plugin.
* Security: no stale copy of the dashboard data is kept, and requests never follow redirects.

= 1.0.0 =
* First release: connection key, dashboard, settings with live preview, three blocks, three shortcodes, classic widget, English and Spanish.

== Upgrade Notice ==

= 2.1.4 =
Pricing buttons and waiting messages now come from Acatudy in your site language.

= 2.1.3 =
Security fixes for the public forms. If your site is behind a proxy other than Cloudflare, add its IP addresses in Settings → Advanced.

= 2.1.0 =
Single sign-on: students go from your site to their classroom without typing their password again. Turn it on in Acatudy first.

= 2.0.0 =
Sell from your own site, course pages and 10 pricing designs. Run the setup again from Acatudy → Settings to create the new pages.
