Page Restrict for WooCommerce

Description

Page Restrict for WooCommerce is a plugin that sells access to pages, posts and custom post types through WooCommerce. It’s been built with Gutenberg in mind as well as the classic editor. You can restrict pages in two ways. Restrict an entire page or restrict sections on the page. In case you want to restrict sections on the page you can use blocks for the Gutenberg editor and using shortcodes for the classic or similar editors. If you want to restrict entire pages you can use enable the sidebar in the More tools & options in the Gutenberg editor or use the page metabox in the classic editor. You can also restrict all of your pages in one place in the Pages plugin menu.

Requirements

  • WooCommerce to be installed and active
  • Guest checkout needs to be disabled
  • PHP 7.0.25+.

Features

  • Restrict content from pages, posts and custom post types based on if they have purchased a specific WooCommerce product
  • Restrict entire page or just sections of it
  • Use one or multiple products to restrict it and choose whether you want to require the user to buy all of them to access or at least one of the products that restrict.
  • Restrict by time – Set a time limit for the user after which they won’t be able to see the content.
  • Restrict by views – Set a view count for the user after which they won’t be able to see the content ( currently only if you want to restrict entire pages ).
  • Use other pages or posts for specific pages as Restricted Messages
  • Use default pages or posts for all restricted pages as Restricted Messages
  • Redirect to the chosen page instead of just showing the other pages content
  • Built for use with the latest Gutenberg editor as well as the classic one
  • Use either Gutenberg blocks or shortcodes to restrict sections on a page or post
  • Plugin menu page to handle all pages you need to restrict in one place called Pages
  • Plugin menu page to get an overview of all users that bought a product required to access an restricted page which either is still valid or already expired called User Overview.
  • Similar feature to User Overview for the frontend for each user to have an overview of their pages where they bought products in order to access them.
  • A Quick Start menu page to get you started on using this plugin

Blocks

page-restrict-wc/restrict-section
Section Restrict for WooCommerce – Restricts a section on the page using this grouping element.

page-restrict-wc/restricted-pages-list
Restricted Pages List – Shows a table of restricted pages for the current user which have had bought products for.

Shortcodes

[prwc_is_purchased products=’1,2′ days=’25’ hours=’2′ minutes=’45’ seconds=’15 inverse=’false’]

  • This restricts the content using the chosen options.
  • Using the inverse option you can choose inverse=’false’ to hide the content in order for the user to not see it. Choose inverse=’true’ for the user to see it in order to show them instructions on what to do to access the desired content you chose using inverse=’false’.
  • Timeout options for this are days, hours, minutes, seconds.

[prwc_restricted_pages_list table=’time’ disable_table_class=’false’]

  • Shows a table of restricted pages for the current user which have had bought products for.
  • Using the table attribute you can choose which table of restricted page you will show. It can show pages that are restricted either by time or view count.
  • Using disable_table_class attribute you can choose whether to kepp or not to keep the default plugin style for the tables.
  • You can show restricted pages that timeout either by time or view.

Coming soon

  • Restrict categories
  • Restrict authors

Screenshots

  • Plugin pages menu page
  • Plugin user overview menu page
  • My account user overview page
  • Plugin quick start menu page
  • Gutenberg sidebar - Products - Restrict with
  • Gutenberg sidebar - Page to Show - Restrict message pages
  • Gutenberg sidebar - Timeout - Time until restriction expires
  • Gutenberg block
  • Gutenberg block - General block settings
  • Gutenberg block - Products - Restrict with
  • Gutenberg block - Timeout - Time until restriction expires
  • Classic metabox
  • Plugin settings

Blocks

This plugin provides 2 blocks.

page-restrict-wc/restrict-section
Restrict Section for WooCommerce
page-restrict-wc/restricted-pages-list
Restricted Pages List

Installation

  1. Upload the plugin files to the “/wp-content/plugins/page-restrict-wc” directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the “Plugins” screen in WordPress
  3. Use the Settings –> Page Restrict screen to configure the plugin
  4. You can go to Settings –> Page Restrict –> Quick Start to get a head start on how to use this plugin

FAQ

Do you have a premium version of the plugin?

No, there isn’t any.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Page Restrict for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.2.0

  • Adding “Not all products required” feature.
  • Fixed bugs
    • Fixed problems with existing products bought checking. It counted only the first full set of products if users needed to buy multiple products.
    • Incorrect order list.

1.1.1

  • Fixed Quick Start text.
  • Fixing bugs.
    • Fixed incorrect namespace used.
    • Fixed guest users executing table list code.
    • Fixed $_POST not having nonce.

1.1.0

  • Admins now can see which users have bought products needed to access pages. It shows users who recently bought it and are valid as a blue color and the users who have expired pages have those in red.
  • Regular users can see their bought (expired or still valid) pages for their account as well. They can see it in their WooCommerce My Account page, or on a separate page using a Gutenberg block or shortcode.
  • Added animation for pagination.
  • Fixed not removing everything on uninstall.
  • Fixed adding data that is not needed.

1.0.0

  • Initial commit.