Ezoic Subscriptions

Description

This plugin connects your site to Ezoic Subscriptions, Ezoic’s paid-content service. Ezoic handles checkout, payments, receipts and the subscriber portal. The plugin decides who can read each post and gives visitors WordPress accounts.

Requires an Ezoic account with this site (https://pubdash.ezoic.com).

  • Content rules protect posts and pages by post, tag or category, and list the products that unlock them. Protected text is withheld from the article, archives, search, embeds, REST and feeds.
  • Sell subscriptions (including trials), one-time passes and promo codes. Products created in your Ezoic dashboard are read-only here.
  • Put checkout on any page with the checkout block or the [ezoic_subscriptions_checkout] shortcode. The checkout link block returns buyers to their article.
  • Visitors log in or create an account before buying, or buy as guests if you turn on Guest checkout.
  • Visitors without access see a paywall message and button, or are redirected, site-wide or per rule.
  • The account block or [ezoic_subscriptions_account] shortcode shows a logged-in visitor their subscriptions, payments and receipts.

Limits:

  • Single-site only: on multisite the plugin does nothing and says so on the Plugins screen. Visitors use WordPress accounts, not Ezoic visitor accounts.
  • Content not rendered through the_content (some page builders, raw post fields) is not protected. Latest Posts in full-content mode can show protected text.
  • Excerpts are not protected. With an empty Excerpt field, WordPress’s automatic excerpt can show a short post in full.
  • If two rules match one post and list different products, the post is blocked for everyone, including subscribers. A category rule does not cover posts only in its subcategories.
  • If Ezoic turns Subscriptions off for this site, purchases stop and visitors keep the access Ezoic last confirmed.
  • The plugin does not configure or purge page caches or CDNs, or hide comments.
  • Welcome and code emails use Ezoic’s English text, as do English visitors’ reset emails. Others get WordPress’s reset email.

External services

This plugin uses Ezoic Subscriptions (https://www.ezoic.com/subscriptions), run by Ezoic Inc. Terms: https://www.ezoic.com/terms . Privacy: https://www.ezoic.com/privacy-policy . Nothing is sent to Ezoic before an administrator clicks Connect or while the plugin is deactivated. Visitor requests start at Go live (earlier only for users who can edit posts).

Ezoic Subscriptions API (https://subscriptions-manager.ezoic.com), called from your server with an encrypted site credential:

  • At Connect: the site address and one-time approval values. Your browser opens your Ezoic dashboard (https://pubdash.ezoic.com) to approve.
  • In the admin: connection and payment status, and the products, prices, promo codes, blocked IPs, policy links and login setting you view or change.
  • At Go live and Turn off: the action, its time, and the WordPress user ID and username of the administrator, for your Ezoic activity log.
  • On protected articles: a logged-in visitor’s email, to check their purchases when the saved answer is over 5 minutes old (2 without access), and on every view for 30 minutes after a checkout. Nothing is sent for logged-out visitors.
  • For logged-in visitors: their email, to get a short-lived sign-in token for checkout and the subscriber portal.
  • On a page with the account block: the visitor’s email, to list their subscriptions and payments and fetch receipts.
  • After a purchase: the checkout session. Every 10 minutes: a request for recent buyers’ emails, to create their accounts.
  • For welcome emails, and for English password-reset emails once live: the visitor’s email. Your site adds the link and sends the email.
  • For Create account: the visitor’s email and 6-digit code. Your site sends the email.
  • At Disconnect and when the plugin is deleted: a request to revoke the connection.

Checkout script (https://sm.ezoic.com/min.js), loaded on public pages once the site is live (earlier only for users who can edit posts; not in the admin, feeds or login page). It talks to https://smbe.ezoic.com to load this site’s settings, run checkout, payment and sign-in, and check whether a logged-in visitor holds an ad-free product (ez_sm_remove_ads cookie). About once an hour per browser (every page view if the browser blocks local storage), it reports the page address without its query string so your dashboard shows the script is installed. During checkout it sends an event for each step (shown, price chosen, payment step, payment error, closed) with the full page address, an Ezoic page-view ID if Ezoic’s ad script is on the page, and the product, price, amount and promo code, for your checkout reports. The browser also connects to Stripe (js.stripe.com, m.stripe.com, q.stripe.com, r.stripe.com, api.stripe.com). Stripe privacy: https://stripe.com/privacy . While Settings Visitor accounts shows Ezoic visitor accounts, it also loads Ezoic’s visitor account script (https://www.ezojs.com), which checks the visitor’s session and sends sign-in, sign-up and reset details to https://identity.ezoic.com. Its Google button loads https://accounts.google.com; Google, Facebook, Apple or Microsoft buttons, if shown, open that company’s sign-in.

Stripe receipts (https://pay.stripe.com, https://invoice.stripe.com) and the subscriber portal (https://subscriber.ezoic.com) open in the visitor’s browser from the account block and account link.

Test mode (https://subscriptions-manager.sandbox.ezoic.com, https://subscriber.sandbox.ezoic.com): when the Dashboard opens while connected, your server checks whether a test purchase was made. Preview in test mode uses it from an administrator’s browser (ezsm_wp_preview cookie).

Search engine IP lists, only when Settings Search engines is on: downloaded from https://developers.google.com, from https://www.bing.com if Bing is chosen, and from https://api.cloudflare.com if “This site is behind Cloudflare” is on. Privacy: https://policies.google.com/privacy , https://privacy.microsoft.com/privacystatement , https://www.cloudflare.com/privacypolicy/ .

Once approved, any administrator or code on this site can use Ezoic Subscriptions for this domain. Revoke it in Settings or Ezoic.

Source code and build

Scripts in admin/build/ and public/build/ are built from admin/src/ and public/src/, which ship with the plugin. To rebuild, run npm install && npm run build (Node.js per “engines” in package.json).

includes/password-strength/ contains zxcvbn-php and the Symfony mbstring and iconv polyfills (MIT), prefixed with PHP-Scoper. Its composer.json, composer.lock and UPSTREAM.md list versions, sources, licenses and rebuild steps.

Blocks

This plugin provides 5 blocks.

  • Ezoic Subscriptions login Log in or create a WordPress account on this site.
  • Ezoic Subscriptions account Shows logged-in visitors their subscriptions and payments on this site, with a Manage subscription button for the Ezoic subscriber portal.
  • Ezoic Subscriptions checkout Checkout form. Sells the price in the checkout link, or your Default price, unless set to sell one price only.
  • Ezoic Subscriptions checkout link A checkout button for one product and price that preserves the incoming article.
  • Ezoic Subscriptions account link Manage subscription button for logged-in visitors; opens the Ezoic subscriber portal.

Installation

  1. Install and activate the plugin.
  2. In Ezoic Subscriptions Settings Connection, click Connect and approve in your Ezoic dashboard. If Settings Visitor accounts shows Ezoic visitor accounts, click Switch to WordPress accounts.
  3. On the Dashboard, click Set up payments, finish setup in your Ezoic dashboard, then click Recheck.
  4. Create products in Products and protect content in Paywall Content rules.
  5. Choose the checkout page (Settings Checkout), the login page (Settings Visitor accounts), and the pricing page and paywall message (Paywall Paywall message).
  6. Until you go live, visitors see your site as if the plugin were off; users who can edit posts see the paywall and checkout.
  7. When payments show Ready, click Go live on the Dashboard. This publishes the Checkout and Log in pages and turns on the paywall and checkout. Turn off reverses it; the pages stay published.
  8. Set up and purge your page cache (see the FAQ), then open a protected article logged out and as a subscriber.

Setup guide: https://docs.ezoic.com/docs/subscriptions/wordpress-plugin/

FAQ

Where do I get help?

For the plugin, use its WordPress.org support forum. For your Ezoic account, payments and payouts: https://support.ezoic.com/

What happens if Ezoic cannot be reached?

Logged-in visitors keep the access Ezoic last confirmed. Everyone else sees the paywall.

How should I configure page caching?

Skip the cache for requests with wordpress_logged_in_ or wp-postpass_ cookies, the login, checkout and Create account pages, and /wp-json/ezoic-subscriptions/. Keep the plugin’s no-store headers. Purge affected pages after changing rules or paywall settings, and everything after Go live or Turn off.

How do visitors get accounts?

Create account makes an account only after the visitor enters a 6-digit code emailed to them; they then log in through your site’s normal login, so its requirements apply. Only with Guest checkout on (Settings Visitor accounts; off for sites set up with this plugin) does a logged-out purchase create a Subscriber account for its email and email a set-password link; the buyer sets a password and logs in. If the email has an account, the visitor must log in. Neither needs “Anyone can register”.

Can search engines index protected articles?

Yes, if you turn on Settings Search engines. Visits from Google’s (and optionally Bing’s) published IP addresses then see the full article. Before Go live, search engines can index every post in full.

What happens when I deactivate or delete the plugin?

Deactivating keeps the connection. Deleting asks Ezoic to revoke it and removes the plugin’s settings, rules and stored visitor access. Pages and user accounts stay.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Ezoic Subscriptions” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Ezoic Subscriptions” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.0

  • Initial release.