Wordpress plugins
WooCommerce Pay Per Post

WooCommerce Pay Per Post

Version : 1.4.8
Tested up to : 4.8.2
Number of download : 9716
Average rating : 5 / 5 on 19 votes 19 votes, 5 avg.rating

Screenshots

WooCommerce Pay Per Post
WooCommerce Pay Per Post
WooCommerce Pay Per Post
WooCommerce Pay Per Post

I looked everywhere and I couldn’t find a plugin already out there, free or premium, that would do the simple fact of selling access to a particular page or post through WooCommerce. So I decided to write my own. This plugin creates a custom field which you simply need to fill in the product id number, or multiple product id numbers, which are needed to be purchased in order view the post. It checks to make sure the user is logged in, AND has purchased that particular product before. If they have, they see the general post content. If they have NOT purchased they are then displayed a Oops page with a buy now button for the product. Shortcodes We also have 2 shortcodes for displaying ALL of the posts/pages that are available for purchase, along with a shortcode to show only all the pages/posts that a user has purchased. [woocommerce-payperpost template='purchased'] This outputs an unordered list of the posts that have been purchased by the current user logged in. [woocommerce-payperpost template='all'] This outputs an unordered list of the posts that can be purchased by a user. Template Functions Out of the box this plugin will work with any theme which uses the standard WordPress function the_content() for those themes that do not utilize the_content() you can use the following static functions in your templates. Woocommerce_PayPerPost::has_access() This checks if the current user has access to the page. It returns true/false Woocommerce_PayPerPost::get_no_access_content() This returns the content specified in the PPP Options. And example of this working together would be something like the following <?php if(Woocommerce_PayPerPost::has_access()): ?> This is the content that a user should see if they paid for the post <?php else: ?> <?php echo Woocommerce_PayPerPost::get_no_access_content(); ?> <?php endif; ?> Requirements This plugin DOES require WooCommerce to be installed and active. I have tested this with the latest version to date Version 3.0.8.

Download now