
Integration with ITERAS, a cloud-based state-of-the-art system for managing subscriptions and payments for magazines.
| Author: | ITERAS (profile at wordpress.org) |
| WordPress version required: | 4.7 |
| WordPress version tested: | 7.2 |
| Plugin version: | 2.0.1 |
| Added to WordPress repository: | 15-07-2014 |
| Last updated: | 27-10-2026 |
| Rating, %: | 60 |
| Rated by: | 2 |
| Plugin URI: | https://app.iteras.dk |
| Total downloads: | 5 677 |
| Active installs: | 10+ |
![]() Click to start download |
|
ITERAS is a complete system for managing subscriptions for print and digital magazines. We automate as many of the hassles of billing as possible and offer you a choice of a wide range of billing methods.
If you publish a printed publication in Denmark and Norway you will likely need to be able to send “indbetalingskort”/”girokort” which we have fully automated. We also integrate with the Danish NemHandel (EAN). Therefore, Iteras is a one-stop solution for Danish and Norwegian magazines and others with similar needs (foreninger, software providers, etc.).
For more information, check out iteras.com.
This plugin allows you to integrate the ordering and self-service parts of ITERAS easily, and set up a paywall in WordPress to only allow access to certain posts to your ITERAS subscribers.
The plugin uses the ITERAS Javascript API, allowing further customizations for those who need it.
FAQ
How does the plugin work?
Each page/post gets a little box where you can choose whether to paywall it or not. The plugin then associates a little bit of extra metadata with the post (stored with the key “iteras_paywall”).
Then when that post is served, the plugin first checks if the visitor has a valid access pass from the ITERAS server.
If not you can setup the plugin to cut off the content and instead insert call to action content (sign up to get access or login). Or you can also setup the plugin to redirect to another landing page.
How do I get started?
Make a test subscriber inside Iteras, fill in the plugin settings, add a test post that you set to be behind the paywall, then experiment with the layout. Once you’re happy, you can add the paywall to real posts.
What shortcodes are available?
You can insert a login iframe in the content by using the WordPress shortcode [iteras-paywall-login paywallid="abc123,def456"].
You can insert an ordering iframe for signing up for a subscription or ordering a product with the shortcode [iteras-ordering orderingid="subscribenow"].
You can insert a self-service iframe to allow subscribers to manage their subscriptions with the shortcode [iteras-selfservice].
The [iteras-return-to-page url='/some/url/?p=123'] is useful if you need to link to another page in the call to action content. It will append the current page to the given URL so that the visitor is redirected back to the original page after having completed an ordering flow or having logged in. NOTE: due to limitations in the WordPress parser, when you put [iteras-return-to-page] in an HTML tag attribute, you need to be aware of single quotes and double quotes. <a href="[iteras-return-to-page url='/some/url/?p=123']">sign up!</a> works while <a href="[iteras-return-to-page url="/some/url/?p=123"]">sign up!</a> doesn’t!
These shortcodes, except [iteras-return-to-page], are internally converted to calls to the ITERAS Javascript API. You can pass more parameters if you need to, e.g. next, see the API documentation for more details. The profile parameter is implicit and comes from your plugin settings.
There’s a few shortcodes for controlling content based on the users logged in status. For showing content when the user has access use [iteras-if-logged-in paywallid="abc123,def456"]Content only shown if the user is logged in and has access[/iteras-if-logged-in]. [iteras-if-not-logged-in] does the opposite. [iteras-if-logged-in-link paywallid="abc123,def456"]Content[/iteras-if-logged-in-link] will automatically insert a link to the subscriber landing page that is configured with the plugin, alternatively a url attribute can be supplied, while login_text can we used to customize the link text. These shortcodes only work with server validation enabled.
Is it possible to force the selection of a specific product on an ordering form?
Yes! Add the GET-parameter orderproduct to a link to your ordering page, e.g. /buysubscription/?orderproduct=12MPro. This will select the “12MPro” product when the user gets to the form.
Is it possble to programatically control if a page should be paywalled?
It is possible to override the decision of which content should be paywalled. Add a hook to the iteras_override_content_paywall filter to define a function that should have the last say in if the content should be paywalled or not. This can for example be used for handling share links the gives the user access eventhough they don’t have a login. This could look something like this:
/**
* Override the decision to paywall the particular content
*
* @param integer $post_paywall_ids The paywalls that give access to the post, if empty the post would not be paywalled be default
* @param object $post Reference to the post being potentially paywalled
* @param boolean $user_authorized If the user has a valid iteraspass that has the appropriate access
* @param array $paywall_config Contains the Iteras plugin configuration
*/
function make_paywall_decision($post_paywall_ids, $post, $user_authorized, $paywall_config) {
// example of generated share token
error_log(openssl_encrypt(json_encode(array('shared_by'=>"John Doe", 'post_id' => $post->ID)), "aes-128-cbc", "somesecret"));
$token = $_GET['token'];
if (isset($token)) {
$share = json_decode(openssl_decrypt($token, "aes-128-cbc", "somesecret"));
if (isset($share) and $share->post_id == $post->ID) {
echo "Shared by " . $share->shared_by;
// signal that the paywall should not be applied
return false;
}
}
// return the paywall ids to apply the paywall as normal
return $post_paywall_ids;
}
add_filter('iteras_override_content_paywall', 'make_paywall_decision', 10, 4);
My visitors don’t return to the page they came from after having signed up?
When you link to other pages, you may be losing the return information needed to redirect the visitors. Send the URL through [iteras-return-to-page] as described above to forward the return information.
When an iframe is embedded directly, the return information is inserted automatically, but when you put the iframe on another page and link to that, the iframe needs to know where the visitors come from to be able to return them correctly.
Can I do something with this plugin without an ITERAS account?
No. But it’s not hard to get one – if you are interested in learning more about ITERAS, please visit iteras.dk and contact us.
What should I do if the plugin ends up being included multiple times on the same page?
You will need to do a custom integration. The plugin attaches to the the_content hook in WordPress which in some situations is called mutiple times by 3rd party plugins.
In this case set the “Paywall integration method” to “Custom” and add the paywall code manually to the theme or plugin you are using. This can be done either by wrapping the post body with the shortcode [iteras-paywall-content]...[/iteras-paywall-content] or by calling Iteras::get_instance()->potentially_paywall_content(...) which returns the content wrapped with the paywall.
Logged in subscribers see truncated preview instead of the full article
When server-side validation is enabled, the plugin truncates paywalled content for visitors without a valid access pass. If a page cache in front of WordPress stores that truncated response under the post URL, every subsequent visitor – including paying subscribers – will see the truncated version. To prevent this, the plugin sends no-cache signals (Cache-Control: no-cache, private, no-store, max-age=0, must-revalidate, Pragma: no-cache, Vary: Cookie, X-LiteSpeed-Cache-Control: no-cache, X-Accel-Expires: 0) and defines DONOTCACHEPAGE for paywalled posts. The “Prevent caching” setting controls this behaviour and is on by default.
If paywalled content is still being cached after upgrading:
-
Run
curl -I https://example.com/<paywalled-post>/and check the response headers. IfCache-Control: private, no-cache, no-storeis present, the plugin is doing its job and the cache layer is ignoring the origin response. If those headers are missing, another plugin or theme is stripping them – disable plugins one at a time to find the culprit. -
If you use Cloudflare, add a Cache Rule that bypasses the cache when the
iteraspasscookie is present, or set the Cache Level to “Respect Existing Headers”. Cloudflare’s default “Cache Everything” page rules can override origin caching directives. -
If you use Varnish or nginx fastcgi_cache/proxy_cache, configure the cache to either respect origin
Cache-Control: private/no-store(most defaults do), or to bypass cache when theiteraspasscookie is present, or to include theiteraspasscookie in the cache key. Make sure the cache does not strip the cookie before forwarding to origin – if it does, even authorized subscribers will receive truncated content. -
If you must disable the plugin’s no-cache signals (for example because your cache is configured to vary on the
iteraspasscookie and you want to keep page caching), uncheck “Prevent caching” in the plugin settings. Do not disable server-side validation – that exposes the full paywalled article to anyone with JavaScript disabled.
How do I let readers register for free before they subscribe?
Paywalled posts can be open to registered users rather than only to paying subscribers, so a reader can go from anonymous to registered to paying. In the paywall box on each post, choose who may read it: “Paying subscribers” or “Registered users”. Paying subscribers can always read posts for registered users too. The “Who may read new posts” setting decides which is preselected.
Registration itself happens in ITERAS, through an ordering form without a product or subscription – that creates a customer without a subscription, who then gets access to posts for registered users. Visitors reach it the same way as the paywall login:
- With “Cut text and add call-to-action box”, posts for registered users show the “Registration call-to-action content” instead of the usual box, if you have filled it in. Put your registration ordering form and a login option there. On these posts, the login and ordering iframes in the box automatically ask for registered-user access, and a reader who registers in the box is sent back to the post, logged in. Links in the box made with
[iteras-return-to-page]pass that on to the login or registration page they lead to. - With “Redirect to subscribe landing page”, posts for registered users send visitors to the “Registration landing page” instead, if you have filled it in.
- On a standalone registration page you link to yourself, add
access="user"to the shortcode, e.g.[iteras-ordering orderingid="register" access="user"].
What a registered user is offered next, such as a subscription, is up to the content of your call-to-action box. The [iteras-if-logged-in], [iteras-if-not-logged-in] and [iteras-if-logged-in-link] shortcodes take access="user" to ask whether the visitor is registered at all, rather than a paying subscriber, so one box can show different offers to anonymous and registered visitors. Without a url, [iteras-if-logged-in-link access="user"] links to the “Registration landing page”. The paywalled content is also wrapped in CSS classes for the visitor’s situation: iteras-access-user or iteras-access-sub for the post’s level, and iteras-insufficient-access for a registered visitor on a post for paying subscribers. Developers can replace the box entirely with the iteras_paywall_box filter, which receives the box content, the post’s level, the visitor’s state (authorized, insufficient, invalid or none) and the post.
Subscribers on iPhone/iPad keep getting logged out
Safari and other WebKit browsers treat cookies written by JavaScript as script storage and delete them after 7 days without user interaction with the site – and cap them at 24 hours if the visitor arrived on a URL with query parameters from a domain WebKit has classified as a tracker. Since the login iframe used to write the iteraspass cookie with JavaScript, subscribers on iOS were logged out again and again no matter how long the access pass itself was valid for.
From version 1.9.0 the login iframe hands the access pass to WordPress instead, and the plugin sets the cookie with a Set-Cookie header from your own domain, where the limit does not apply. The pass is renewed the same way, so the cookie never goes back to being script-written. The “Login session cookie” setting controls this and is on by default. It requires a signing key, since the plugin verifies the signature on the pass before it sets any cookie.
If subscribers are still logged out too soon:
-
Check that a signing key is filled in on the settings page. Without one the setting is inactive.
-
Log in with Safari’s Web Inspector open and check in the Network tab that the request to
?iteras-pass=1answered with aSet-Cookie: iteraspass=...header. If it did, the cookie came from your server and Safari’s limit does not apply to it. The cookie’s expiry date under Storage is not a useful check – Safari shows the full expiry either way, and removes script-written cookies without changing it. -
If your visitors move between
example.comandwww.example.com(or other subdomains), set the “Cookie domain” setting to.example.comso the session follows them. Use the setting rather than anIteras.cookieDomainsnippet in your theme – if the two disagree the visitor ends up with twoiteraspasscookies that drift apart, and which one counts is up to the browser. -
If a page cache in front of WordPress serves pages without running PHP, make sure it bypasses the cache for requests that carry an
iteraspassquery parameter. Most caches already bypass URLs with a query string. POST requests, which is what the pass endpoint uses, are never cached.
Can I use the server-side login cookie without WordPress?
Yes, see keeping visitors logged in in the API documentation.
Can the login and ordering forms be served from our own domain?
Yes. Set up a domain of your own for ordering forms and self-service in ITERAS, e.g. subscriptions.example.com, and enter it as “Custom domain” in the plugin settings – the first one, if you have set up several. The plugin then loads the ITERAS JavaScript API from that domain, and the login, ordering and self-service iframes are served from it instead of app.iteras.dk. Since the iframes are then on a subdomain of your own site, a cookie set for your whole domain, such as a consent cookie, can be read inside them.
When you save the setting, the plugin checks that the domain answers with the ITERAS JavaScript API, and keeps the previous setting if it doesn’t – a domain that doesn’t work would stop every login and ordering form on the site. A domain that has just been added in ITERAS can take a little while to become ready.
Security issues
If you discover a security issue, please contact us. You can also report it through Patchstack.
2.0.1
- Security: paywalled posts and pages could be read in full without an access pass through the WordPress REST API (
/wp-json/wp/v2/postsand/wp-json/wp/v2/pages), on home pages and in archives of themes that list full posts, in search results and other post lists, and in excerpts, because server-side validation only cut the content on the post’s own page and in feeds. The content is now cut to the snippet wherever WordPress renders it, for everyone but editors, without the call-to-action box. Subscribers still read the full article on the post itself. - Post lists and automatic excerpts now show no more of a paywalled post than the “Cut text at” setting allows. For a longer teaser, write one in the post’s Excerpt field, which is shown as it is.
- Apps and services that read full articles from the REST API now need to authenticate as a WordPress user who can edit pages.
- Clear your page cache after updating, so pages cached with full articles are dropped.
2.0.0
- Paywalled posts can now be opened to registered users instead of only to paying subscribers, for a funnel from anonymous to registered to paying. Each post has a “Who may read” choice in its paywall box, the post lists show it in the Paywall column, and there are bulk actions to change it. Paying subscribers can always read posts for registered users too. Existing posts stay for paying subscribers.
- New settings for posts for registered users: a “Registration landing page” for the redirect display type and a “Registration call-to-action content” box for the same-page display type, both falling back to the existing ones when empty, and “Who may read new posts” to choose what new posts start out as.
- On posts for registered users, the login and ordering iframes in the call-to-action box ask for registered-user access, and so do the pages that
[iteras-return-to-page]links in the box lead to. An order placed in the box returns the reader to the post, logged in. Before, an order placed in the box ended on the ITERAS confirmation page and the reader still had to log in. - The
[iteras-if-logged-in],[iteras-if-not-logged-in]and[iteras-if-logged-in-link]shortcodes take anaccessattribute:access="user"asks whether the visitor is registered at all, while the default still asks for a paying subscriber. - Shortcodes nested inside
[iteras-if-logged-in],[iteras-if-not-logged-in]and[iteras-if-logged-in-link]are now supported, e.g. a login or ordering iframe shown only to visitors who aren’t logged in. Before, they showed up as literal text. - New CSS classes on paywalled content:
iteras-access-user/iteras-access-subfor the post’s level, anditeras-insufficient-accessfor a registered visitor on a post for paying subscribers. - New “Custom domain” setting: with a domain of your own set up in ITERAS for ordering forms and self-service, the plugin loads the ITERAS JavaScript API from it, so the login, ordering and self-service iframes are served from your domain instead of app.iteras.dk.
- For developers: a new
iteras_paywall_boxfilter, and theiteras_override_content_paywallfilter receives the post’s level as a fifth argument. Existing four-argument callbacks are unaffected. - Fixed: when the
iteras_override_content_paywallfilter moved a post behind other paywalls, visitors were still checked against the post’s own paywalls on the server, so subscribers to the new paywalls got a cut-off article and subscribers to the old ones the full article. - Fixed: the bulk actions for adding and removing paywalls did not check that the user may edit each selected post.
- Fixed: a malformed access pass cookie could cause a fatal error on PHP 8 when no signing key was configured.
- Fixed: a PHP 8 warning from
[iteras-return-to-page]and[iteras-if-logged-in-link]when the URL has no query string.
1.9.0
- The access pass cookie for login sessions is now set by the server with a
Set-Cookieheader instead of by JavaScript, so Safari and other WebKit browsers no longer delete it after 7 days (or 24 hours) and subscribers on iPhone and iPad stay logged in for as long as the pass is valid. Renewals go the same way. Controlled by the new “Login session cookie” setting, on by default, and requires a signing key since the plugin verifies the pass signature before setting a cookie. - Added a “Cookie domain” setting for sites where visitors need to stay logged in across subdomains.
- The access pass cookie is now set with
SecureandSameSite=Lax. - An access pass delivered in the URL is now consumed and removed by the server before the page renders, instead of only being picked up on pages that run a paywall check.
- Login sessions are now renewed from any page rather than only from paywalled posts, so subscribers who mostly read free content stay logged in. The renewal does nothing for visitors who are not logged in, and happens at most once a day per visitor.
- Refreshed the admin design. The settings page is split into Connection, Paywall and Advanced sections, synchronized paywalls are listed with their IDs, and the Synchronize button shows that it is working. The paywall box in the post editor has proper labelled checkboxes and shows configuration problems as standard WordPress notices, and the Paywall column in the post and page lists now shows a lock with the names of the paywalls instead of a plain check mark. The box title and column header are now translated too.
1.8.4
- Added “Prevent caching” setting (default on) that sends no-cache signals on paywalled posts and on feeds containing paywalled items so page caches do not serve the truncated response to every visitor. Non-paywalled posts, pages, archives, and clean feeds remain fully cacheable. Compatible with WP Super Cache, W3 Total Cache, WP Rocket, LiteSpeed Cache, Cache Enabler, Hummingbird, and standards-compliant reverse proxies / CDNs.
1.8.3
- Security: Fixed stored XSS vulnerability in shortcode attribute handling (CVE-2026-4078)
- Security: Added proper output escaping throughout the plugin
- Security: Replaced deprecated FILTER_SANITIZE_STRING with sanitize_text_field
- Security: Used wp_kses_post for paywall box content sanitization
- Fixed PHP string concatenation bug in paywall box fallback message
- Updated minimum PHP version requirement to 7.2
1.8.2
- Keep images when truncating in the front-end
1.8.0
- Paywall bulk actions and paywall column available on pages overview
- Fixed potential CSRF problem with plugin settings form in WordPress administration
1.7.0
- Paywall signing key is now handled separately
1.6.0
- Added bulk action for updating paywall state on posts
1.5.0
- Added possibility to force a product selection on ordering forms with the
orderproductGET parameter - Fixed problem with fade bar styling of the call-to-action box
1.4.1
- Content in feeds (such as RSS) is now truncated if the post has been marked as paywalled
1.4.0
- Added
iteras_override_content_paywallfilter for overriding the decision of paywalling the content
1.3.6
- Added
[iteras-if-logged-in],[iteras-if-not-logged-in]and[iteras-if-logged-in-link]shortcodes for controlling content based on logged in status
1.3.5
- Added filter (
after_paywall_script_prepared_except_redirect) of the prepared paywall script before adding to the end of content
1.3.4
- Render paywall box during document render to make sure Iteras shortcodes are inserted at the proper position
1.3.2
- Fixed problem related to older WordPress versions
1.3.1
- Moved down paywall priority so other shortcodes are run before truncating content
- Only apply paywall to detail pages (singles)
1.3.0
- Show paywalled content for editors
- Added indication if content is paywalled on post list view
- Fixed problem with default paywall configuration
1.2.1
- Tested with WordPress 5.1
1.2
- Output paywall pass cookie check result to be able to detect missing cookies
- New setting to disable server-side validation of paywall pass cookies
1.1.2
- Be more defensive when checking the pass to prevent possible compatibility problems
- Remove incorrect warning when using the call to action content
1.1.1
- Fix server-side check in case a setting is missing
- Add [iteras-ordering] shortcode to replace deprecated [iteras-signup] (still accessible for the time being)
- Add [iteras-return-to-page url=’…’] to make it easier to avoid breaking the return path when using links in call to action content
- Fix some issues in the settings page
- Update translation
- Expand documentation
1.1
- Server-side authorization check and content truncation
- Paywalling of pages
1.0
- Support for new paywall setup in ITERAS with multiple paywalls
- Changed how posts are paywalled
- Update to this version requires reconfiguration of the plugin
- Paywall login shortcode now accepts paywallid [iteras-paywall-login paywallid=”abc123,def456″]
0.5
- Support for manual inclusion of paywall
- Direct access to paywall functions for custom integration
0.4.5
- Corrected references to the ITERAS backend
0.4.4
- Support older PHP versions
0.4.3
- Fixed CSS gradient for call-to-action box
0.4.1
- Fixed shortcode handling
0.4
- Added support for call-to-action box and cut text on restricted posts
0.3
- Added shortcodes for embedding ITERAS content (iteras-signup, iteras-selfservice, iteras-paywall-login)
- Added danish translation
0.2
- First public release
0.1
- First release – paywall integration.
