12% off of LTD using this coupon: TWELVEPERCENTOFF. Promo ends on 2 Dec midnight UTC.
Published on Jun 3, 2021

[Condition] Pay For Post with WooCommerce

Sridhar Katakam

This members-only tutorial provides the code to register a custom condition for outputting elements to users depending on whether they have purchased specific WooCommerce product(s) via the Pay For Post with WooCommerce plugin in Oxygen.

With a Page protected like this:

and the Page edited with Oxygen and

our custom condition set to a Section having "This is protected content." heading

and

condition applied to a Section having the no access message code, this is what the Page will appear to users that have NOT purchased the associated product(s), "Beanie" in this case:

and users that have purchased the product will see:

Step 1 - Register the Condition

Add the following using a plugin like Code Snippets or in a custom functionality plugin:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $599 one-time).

Already a member? Log in below or here.

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right