/leaky-paywall

The #1 metered paywall for WordPress. Sell subscriptions without sacrificing search and social visibility.

Primary LanguagePHP

=== Leaky Paywall for WordPress ===
Contributors: zeen101, layotte, pericson, endocreative
Tags: magazine, issue, manager, paywall, leaky
Requires at least: 3.3
Tested up to: 4.9.5
Stable tag: 4.10.10
Tags: paywall, subscriptions, metered, membership, pay wall, content monetization, metered access, metered pay wall, paid content
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

The first and most flexible metered paywall for WordPress. Sell subscriptions without sacrificing search and social visibility. 

== Description ==

[Leaky Paywall](https://zeen101.com/for-developers/leakypaywall/) is perfect for bloggers, news, and magazine sites that need content to be discovered in Google search and shared socially on Facebook and the rest. Set your meter to allow X number of free articles before requiring a subscription.

Pioneered by the Financial Times, popularized by the New York Times and used by 1000’s of publishers large and small, the metered paywall is now the most successful paywall approach in the publishing industry.

**Features**

* Metered paywall: Let your readers read X number of free articles before they need to subscribe
* Get found in Google: Allows all your content to be indexed by search engines
* Viral sharing: All your articles can be shared 1000s of times in social media
* Sell live web issues: Integrates with [IssueM](https://zeen101.com/for-developers/issuem/) to sell access to individual special issues or traditional weekly, monthly, quarterly, etc issues
* iOS and Android app publishing: Integrates with [UniPress](https://zeen101.com/unipress/) to easily give your subscribers access to apps and sell subscriptions in the app stores
* Build your email list with a Free subscription level
* Granular content restriction: Optionally set any article as subscriber only or always free/public
* Much more

**Leaky Paywall integrates with**

* [IssueM](https://zeen101.com/for-developers/issuem/) issue publishing: Our IssueM plugin allows publishers to manage live web issues that are mobile, search engine, and social sharing friendly. Issues and articles reach today’s modern reader. Now you can promote and sell subscriptions to special or traditional recurring issues. 

* iOS and Android apps! Leaky Paywall integrates with [UniPress](https://zeen101.com/unipress/) to give your subscribers native mobile apps for the best reading experience available today. Your subscribers will have automatic access to your content in the app after subscribing with Leaky Paywall. All content and apps are managed right in WordPress for true 1 click publishing.


**Add-ons available to power up your publication**
Some of our [add-ons](https://zeen101.com/leakypaywall/leaky-paywall-add-ons/?utm_source=addons&utm_medium=description_tab&utm_content=addons&utm_campaign=readme) include: 

* [Recurring Payments](https://zeen101.com/downloads/leaky-paywall-recurring-payments/?utm_source=addons&utm_medium=description_tab&utm_content=recurring_payments&utm_campaign=readme) charges subscribers automatically when its time for their subscription to renew
* [Trials](https://zeen101.com/downloads/leaky-paywall-trials/?utm_source=addons&utm_medium=description_tab&utm_content=trials&utm_campaign=readme) allow subscribers to sign up for a trial to any recurring level.
* [Multiple Levels](https://zeen101.com/downloads/leaky-paywall-multiple-levels/?utm_source=addons&utm_medium=description_tab&utm_content=multiple_levels&utm_campaign=readme) allows you to give your readers different subscription options.
* [Coupon Codes](https://zeen101.com/downloads/leaky-paywall-coupons/?utm_source=addons&utm_medium=description_tab&utm_content=coupon_codes&utm_campaign=readme) allows you to create unlimited coupon codes for your subscription levels.
* [Gift Subscriptions](https://zeen101.com/downloads/gift-subscriptions/?utm_source=addons&utm_medium=description_tab&utm_content=gift_subscriptions&utm_campaign=readme) allows friends and family to buy gift subscriptions.
* [IP Exceptions](https://zeen101.com/downloads/ip-exceptions/?utm_source=addons&utm_medium=description_tab&utm_content=ip_exceptions&utm_campaign=readme) allow visitors from designated IPs to view articles and posts without having to subscribe.
* [Corporate subscriptions](https://zeen101.com/downloads/corporate-subscriptions/?utm_source=addons&utm_medium=description_tab&utm_content=corporate_subscriptions&utm_campaign=readme) allow restricting access by domain or email address.
* [Reporting Tool](https://zeen101.com/downloads/reporting-tool-free/?utm_source=addons&utm_medium=description_tab&utm_content=reporting_tool&utm_campaign=readme) allows you to filter and download a CSV file of the subscriber info you need.
* [File restrictions](https://zeen101.com/downloads/subscriber-downloads/?utm_source=addons&utm_medium=description_tab&utm_content=file_restrictions&utm_campaign=readme) hides any link to any file (PDF, image, etc) in your media library.
* [MailChimp](https://zeen101.com/downloads/leaky-paywall-mailchimp/?utm_source=addons&utm_medium=description_tab&utm_content=mailchimp&utm_campaign=readme) automatically adds new subscribers to a Mailchimp list.
* [Bulk Import Subscribers](https://zeen101.com/downloads/leaky-paywall-bulk-import-subscribers/?utm_source=addons&utm_medium=description_tab&utm_content=bulk_import&utm_campaign=readme) allows you to bulk import subscribers from a CSV file.
* [Article Countdown Nag](https://zeen101.com/downloads/article-countdown-nag/?utm_source=addons&utm_medium=description_tab&utm_content=countdown_nag&utm_campaign=readme) lets the reader know how many free articles they have left before they need to subscribe.
* More

For documentation see: [https://zeen101.com/documentation](https://zeen101.com/documentation-category/leaky-paywall/)

We love contributions! Head over to our GitHub page if your feeling inspired [https://github.com/zeen101/leaky-paywall](https://github.com/zeen101/leaky-paywall)

A plugin for WordPress that allows you to sell metered access to your content. More info at [https://zeen101.com/](https://zeen101.com/)

== Installation ==

1. Upload the entire `issuem-leaky-paywall` folder to your `/wp-content/plugins/` folder.
1. Go to the 'Plugins' page in the menu and activate the plugin.

== Frequently Asked Questions ==

= How does Leaky Paywall work? =

The Leaky Paywall meter restricts by X number of free articles over a Y time period. days, weeks, months, years. There is a visibility setting on the post edit screen you can use to override the global meter setting. EG: make an article always free or always require a subscription

= What payment gateways do you support? =

We support Stripe and PayPal by default. CyberSource and ESP requires some setup, and other gateways can be integrated with our API. We highly recommend Stripe to give both you and your subscribers a state-of-the-art experience. 

= What kind of subscriptions can I create with Leaky Paywall? =

You can sell daily, weekly, monthly, and annual subscriptions, both one time and recurring. You can also offer a free subscription in exchange for an email address.

= If I deactivate Leaky Paywall will I lose all my subscriber data? =

You can deactivate Leaky Paywall at any time without losing any subscriber data. All subscribers are stored as WordPress users in your database.

== Changelog ==

= 4.10.10 =
* add filter for restriction cookie name
* update translation strings
* stop creating stripe extra plans when saving settings
* add currency options for formatting displayed prices
* add login link to email exists error on registration form
* fix password display on email for stripe checkout gateway

= 4.10.9 =
* add filter to enabled gateways
* adjust visibility settings for cancelled subscribers
* update translation strings for credit card
* use payment gateways for select option when adding a new subscriber manually
* add data-locale flag to stripe checkout form to allow for translation

= 4.10.8 =
* Add filter for adjusting cancellation confirmation text
* Update title on wp_die calls
* Allow subscribers to renew their current level from the subscribe page
* Allow subscribers to delete their account from their account page

= 4.10.7 =
* Update faq
* Update upgrade function

= 4.10.6 =
* Refactor level row to use action leaky_paywall_after_subscription_levels_row
* Update password handling
* Add setting to hide a level from the subscribe cards
* Add filter to status dropdown on subscriber table

= 4.10.5 =
* Fix display of price on subscribe cards for recurring levels

= 4.10.4 =
* Add ability to search subscriber table by subscription and plan ID
* Update subscriber table query to work with large database of users
* Add leaky_paywall_paypal_args filter for editing paypal args before sending them to paypal
* Update nag message and subscribe card styles
* Add user profile fields for Leaky Paywall to an individual user page in the admin
* Add hooks and filters needed for trials
* General bug fixes

= 4.10.3 =
* Fixed bug causing multiple charges for same checkout
* Refactor restrictions

= 4.10.2 =
* Fixing subscription expiration bug for Stripe

= 4.10.1 =
* Adding some additional event tracking
* Adding some additional hooks

= 4.10.0 =
* Change in registration process
* General code cleanup
* New filters/hooks
* Reminder emails!

= 4.9.2 =
* Switching serialize commands to json_en/decode commands, for security reasons
* add leaky_paywall_cancelled_subscriber hook when a paypal user cancels a subscription
* add help tab to settings page
* update html of subscription options details
* Fix the php warning from stripe/lib/ApiRequestor.php:242 (h/t: [Ku Lok Sun](https://github.com/199911))

= 4.9.1 =
* Add translation for credit card label
* Add cancel link back to my account page for paypal subscribers
* Add translation files for nederlands
* Udpate domain path to translations
* Update stripe
* Update translation text domain to work with new translation system
* Add filter for login form args
* Add name column to subscriber table

= 4.9.0 =
* Add fix for paypal subscription cancel webhook notification not getting processed
* Remove avatar from subscriber table
* Add check for user switching plugin
* Add integration with user switching plugin by adding a switch to link to the lp subscriber table if the plugin exists
* Add status filter to subscriber table
* Update level filter to work with zero as a level id
* Add level filter to subscriber table
* Fix fatal error on checkout form in stripe fields if keys are set incorrectly
* Update stripe calls through code for v5.1.2 of stripe library
* Update stripe php library to 5.1.2
* Add default case for stripe event check if the event name returned does not match any of the cases
* Update the wording on the profile page for users who have cancelled their subscription but are still active because their expiration date has not passed

= 4.8.0 =
* Fix bug when Stripe Expired set, but account not expired
* Added JS/AJAX Version of Leaky Paywall (beta functionality)
* Added various filters, classes, hooks, etc.

= 4.7.0 =
* Removing Stripe TLS warning in favor of forcing TLS version using WooCommerce's solution (thanks Woo)
* Add filter to adjust leaky paywall profile table
* Add country names to currency list and a hook for adding settings in the currency settings section
* Add leaky_paywall_your_subscription_total filter
* Add filter to adjust subscription price on subscribe cards
* Removing SUBSCRIBE_LOGIN_URL from text description (still works in code)

= 4.6.1 =
* Fix causing admin to break when first activation LP w/ no Stripe Key set

= 4.6.0 =
* Adding Stripe TLS notice
* Fix bug in validate username when user uses a capital letter
* Send email notification in registration function
* Add level_id to leaky_paywall_form_processing and leaky_paywall_form_errors actions
* Add level arguement to leaky_paywall_create_stripe_plan filter
* Fix index error on content variable
* Fix index error if no plan id is submitted with registration form
* Add filter for email message
* Shortcode customizations
* Add action leaky_paywall_after_your_subscription_details for adding additional items to the Your Subscription section on the registration form page
* Add function for getting the currency symbol
* Add leaky_paywall_create_stripe_plan filter to adjust details before creating a stripe plan
* Add filter before login form for display content to non logged in users

= 4.5.2 =
* Removing deprected function usage wp_setcookie() to wp_set_auth_cookie()
* Better handling when Stripe fails and user is already created but not logged in

= 4.5.1 =
* Add option for disabling admin notification email when a new subscriber is added to leaky paywall
* Add a filter for editing the text of the admin email
* Fix bug that was setting the incorrect value for restrictions

= 4.5.0 =
* Add filter to expires in has_user_paid function for corporate subscriptions
* Update email template to allow for images and html
* Add action leaky_paywall_before_download_pdf before a restricted pdf is downloaded
* Add leaky_paywall_cancel_subscription_description for altering text on cancel pagee
* Add leaky_paywall_content_access_description filter for altering text on register form subscription description
* Fix number format error in subscription details on free level

= 4.4.0 =
* Refactor License Key Settings
* Add leaky_paywall_failed_payment action for paypal webhooks
* Add leaky_paywall_failed_payment action for Stripe webhooks
* Update check for new leaky paywall subscriber email to be sent so that it works again with the Strip credit card form
* Add leaky_paywall_cancelled_subscriber action after a subscriber has cancelled
* Fix bug with cancel link not showing on user profile
* Add current_tab value to leaky_paywall_update_settings_settings filter
* Fix number format error for free subscriptions on registration form
* Add hook after enabled payment gateway settings
* Refactor leaky_paywall_has_user_paid function

= 4.3.0 =
* Including User object w/ wp_login action call
* Fix mode bug in paypal webhook processing
* Add css class to subscription options h2 tag
* Fix mode bug during Stripe webhook processing

= 4.2.0 =
* Settings Page Rebuild

= 4.1.5 =
* Fixing debug output code on Stripe card decline

= 4.1.4 =
* Updating translation strings and POT file

= 4.1.3 =
* Fixing bug in PayPal processing

= 4.1.2 = 
* Fixing India Rupee sign
* Updating some verbage on the Profile Page for passwords

= 4.1.1 =
* Show only sites in leaky paywall settings to super admins only
* Fixing bug causing deleted plans to permanently delete, instead of just being marked as deleted
* Update level site settings so the chosen site is selected in the dropdown after saving the plugin settings

= 4.1.0 =
* Deprecating wp_get_sites usage for 4.6.x+
* Removing upgrade path in favor of already existing functionality
* Fixing Stripe payment form to handle existing logged in users better
* Add filter for changing the order of the subscription card levels on the subscribe page

= 4.0.6 =
* Fix for multisite subsites not showing payment data
* Adding Created column to subscribers table
* Fixing default sort order in subscribers table

= 4.0.5 =
* Update registration form to correctly calculate coupon discounts

= 4.0.4 =
* Do not show Payment Information for non-recurring payments

= 4.0.3 =
* Fix a bug in Stripe onetime payment, causing HUGE payments
* Fix credit card form display
* Style updates and code cleanup

= 4.0.2 =
* Set defaults for visibility metaboxes
* Fixing bug w/ Stripe cancellations not displaying content if not yet expired
* Checking for zero based level ID in registration form output w/ LP subscription shortcode

= 4.0.1 =
* Hide dashboard widget from non-admin users
* Set stripe key based on mode inside of has_user_paid function

= 4.0.0 =
* Payment Gateway Redux
* Free Subscriptions Updates
* Default Gateway Stripe Popup
* Added Credit Card Form for Stripe
* Cleanup PayPal processing
* Cleanup Bulk Import Code
* General Code Cleanup

= 3.8.0 =

* Add recent subscribers dashboard widget
* Add a check to the new subscriber email to make sure the user does not already exist in the system
* Add leaky_paywall_after_new_subscriber_form action on subscriber page
* Adding HTTP Version to PayPal API calls... fixing get current user function calls
* Fixing deprecated function call
* Add bulk csv uploader to subscribers pagee

= 3.7.0 =
* Setup 'rememberme' to true for set_auth_cookie calls
* Adding support for Zero-Decimal currencies in Stripe

= 3.6.0 =
* Update add ons page with publisher bundle banner
* Fixing bug when detecting empty users and level IDs
* Fixing bug when updating subscriber information
* Adding filters for new payment gateways
* Adding text to profile shortcode for unpaid accounts to resubscribe.

= 3.5.0 =
* Fixing bug in PayPal IPN EOT/Suspend/Cancel
* General Code cleanup
* Add after subscribe page redirect after a new user is created

= 3.4.0 =
* Adding text-domain
* Updating POT file

= 3.3.1 =
* Fixing Bulk Importer bug

= 3.3.0 =
* Remove reference to EDD updater class
* Add function to build post type row in access options when add new post type button is clicked
* Removing EDD Updater references

= 3.2.1 =
* Fix: Don't show deleted levels on frontend

= 3.2.0 =
* Release to Public on WordPress.org
* Create Add-ons page
* Fix for int/string compare on subscription options shortcode
* Expiration Fix
* Adding new filters and actions
* General code cleanup
* General styling cleanup

= 3.1.3 =
* Fixed bug causing updater to always say there is an update

= 3.1.2 =
* Fixed bug when manual payments are unlimited
* Fixed bug with trim() vs empty() calls on content availability

= 3.1.1 =
* Fixed different bug causing default restrictions to not be found

= 3.1.0 =
* Fixed bug causing default restrictions to not be found
* Fixed bug caused when multiple payments exist for a user
* Updated for Leaky Paywal Coupons
* Updated various texts and tags
* Fixed bugs related to emails not being sent
* Remove duplicate entries in subscriber table
* Fix php errors on subscription page
* Add multisite checks to subscriber table user data
* Only add blog id to subscriber query if is multisite
* Add level id to each subscription option subscribe box
* Adding all the Stripe supported currencies
* Fixing bug w/ Free Susbcription disappearing on upgrade, username changing on upgrade, email notifications not wokring, and email notifications not replacing args

= 3.0.0 =
* Initial Multisite Support

= 2.1.0 =
* Escaping add/remove_query_arg calls properly

= 2.0.9 =
* Adding Australian Dollars
* Add EDD SL plugin updater class and functionality to lp
* Add invalid notice to license key field when an incorrect license key is entered, or it is already active on another site
* Update new user notification for free users so the email sends

= 2.0.8 =
* Fixed bug when a new free user was updated

= 2.0.7 =
* Fixed currency bug in Stripe

= 2.0.6 =
* Pruned unused multisite settings
* Fixed JS bug

= 2.0.5 =
* Adding filters for demo.zeen101.com
* Removing unused code from BETA build

= 2.0.4 =
* Adding currency options for USD, GBP, and EUR

= 2.0.3 =
* Adding PayPal IPN txn_type case for max failed payments and suspended payments
* Fixed bug with PayPal IPNs being sent with no item_number field
* Properly trim search arguments on Subscribers table

= 2.0.2 =
* Better error reporting for payment processing
* Separated subscribe and login url replacement arguments
* Manual payment method is default option on subscriber table form now
* Force lowercase for status during bulk imports
* Switching back from wp_loaded to wp action hook
* Adding some styling, fixed bug in return variables for PayPal
* Adding options to show all WP users in subscriber table
* Setup update script to ensure previous versions installed stay on 'passwordless' login method, while new insta
* PayPal updates, to work better for people without PayPal accounts
* Adding language files
* Added ability to add/edit subscribers manually with correct Payment Gateway information
* Added better search capabilities for email addresses
* Added filter to change which roles get access to content without being a subscriber, preliminary work for PayP

= 2.0.1 =
* Fixing bug in calling Leaky Paywall class method

= 2.0.0 =
* Fixing save meta box bug
* Updating IssueM references to point to zeen101
* Fixed bug in visibility saving for custom post types, added new action for bbpress functionality
* Fixing PayPal Sandbox bug
* Adding Pay with PayPal text to subscription options
* Few subscriber table bugs, new subscriber update
* Removing debug output for testing
* Updating Stripe API, enabling subscription upgrades through Stripe
* Fixing bulk import with level-id, Adding mode arg to get subscriber by hash function
* Fixing bug in single() test during processing, and per-post visibility, and enqueueing scripts properly on new content
* Removing testing line for updater
* Removing some duplicate code, and return default restrictions if no subscriber ID is set
* Modified output for overridden pages, changed how issuem_leaky_paywall_attempt_login attempst to log in users, moved around text for non-valid accounts when logging in and needing to subscribe still
* Adding metabox to all available post types to override leaky paywall defaults
* Migrated all users to use WP user meta for all LP meta, debuging new cookie setup too
* Recommend Merchant ID over PayPal Email address, fixed a paypal PDT bug
* Extra security when creating usernames in WP
* Re-organize the Settings page a bit, add some better UI
* Adding details to subscription options to explain expiration, added GUI for updating cookie expiration, moved functions to a hook that happens sooner to prevent cookie warnings, fixed bug in susbcriber table (everyone listed as no-plan), setup better stripe and paypal processing
* Adding multilevel Integration
* Modified how the excerpt and paywall content is output and fixed a bug caused by 3rd party plugins calling content/excerpt functions in WP
* Do not block login and subscription pages if page type is being blocked. Adds ability to modify usernames and sets usernaes based on front of email, not whole email
* Completely modified LP to use WordPress Users Table... added migration functionality to move existing users to WP Users table, modified all functions to use WordPRess Users and Meta Tables and functions.

= 1.2.0 =
* Added new function to verify login hashes
* Moved login hash check inside of process_request function
* Added check for subscriber session to add to cookie if cookie is empty
* Set Stripe API version to latest version before they added multi-subscriptions (until we can handle it gracefully)

= 1.1.8=
* FFixing issue with non-recurring payments not adding to subscribers table
* Verify Stripe class has not been initiated before including Stripe SDK
* Verify PHP Session has not been initiated before starting a session

= 1.1.7 =
* Fixed bug causing some sites to not register logged in users
* Fixed empty/isset bug

= 1.1.6 =
* Major login redux/bug fix
* Added ability to restricted PDF downloads to subscribers
* Modified Subscription shortcode to offer login option to reduce confusion
* Modified subscription shortcode output to not rely on CSS to hide multiple unused shortcodes
* Removing my IPN notification debug code

= 1.1.5 =
* Removed issuem dependency for License Activated
* Fixed license_key activation workflow
* Fixed bug in member table pagination
* Removing invalid file

= 1.1.4 =
* Fixed bug in login link generation for sites not using permalinks

= 1.1.3 =
* Fixed bug in subscribe shortcode

= 1.1.2 =
* Fixed bugs related to licensing system

= 1.1.1 =
* Fixed bug causing articles to be duplicated in the free article count
* Added manual COOKIE setting
* Fixed typo in filter
* Fixed bug in stripe recurring setting UX
* Added options to shortcode to deal with multipl subscription options, and css to hide the extra subscription

= 1.1.0 =
* Fixed cookie expiration bug
* Updated Stripe SDK
* Added a few actions during update/add subscriber process
* Fixed selected() status on member dashboard
* Added subscriber page
* Bulk import
* Add/edit existing subscribers
* Added paypal as a gateway
* Moved Leaky Paywall out of IssueM as it's own menu
* Fixed typo in Stripe currency filter
* Added extra live/test mode SELECT query checks

= 1.0.2 =
* Extended zeen101's Leaky Paywall add-on to work without IssueM
* Fixed a few typos
* Fixed bug with using the same email address in Live or Test mode with Stripe.

= 1.0.1 =
* Fixed bug to allow changing charge description
* Fixed bug preventing users from logging out of subscription
* Fixed bug internationalization text domains

= 1.0.0 =
* Initial Release

== License ==

Leaky Paywall for WordPress
Copyright (C) 2011 The Complete Website, LLC.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>.

== Screenshots ==
1. Leaky Paywall general settings
2. Leaky Paywall content restriction settings
3. Leaky Paywall subscription level settings
4. Leaky Paywall payment method settings
5. Leaky Paywall visibility settings let you overwrite the default restrictions on a per content basis
6. Leaky Paywall subscriber table to manage current current subscribers and add manually add new subscribers
7. Leaky Paywall subscribe nag after a reader has reached their article limit
8. Leaky Paywall subscribe cards
9. Leaky Paywall register form for both free and paid levels
10. Leaky Paywall account page for a subscriber to manage their account information