Pay Per View with Woocommerce Categories

I am trying to protect certain Woocommerce categories generated by a plugin Bulk Photo to Product Importer so that people who want to view their photos have to pay a "preview fee" with the Pay Per View plugin, and can then select the photos to buy through woocommerce once they view them.

I am trying to use the do_shortcode('ppw') in my theme, as well as the function provided in your usage manual to try to protect the content in the archive-product.php template of woocommerce. Is there any way to do this? I know it's a bit of strange customization.

I can't use membership, because we need people to pay for each day they want to view their photos, instead of being able to access them with their membership. If someone has two different shoots, then their membership will allow them to view a category that their membership level allows without paying for the new category.

Any suggestions?

  • Michael Bissett
    • Recruit

    Hey @Cameron Underdown,

    In regards to your page, did you make sure that the protection method's been set to "Use selection tool", inside of the "Pay Per View" metabox?

    In regards to the customization you're referring to, I'd like to have a deeper look at what you've done, could you please send in the following via our secure contact form:

    - Mark to my attention, the subject line should contain only: ATTN: Michael Bissett
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include WordPress admin access details (login address, username & password)
    - Include FTP log-in details (hostname, username & password)
    - Include any relevant URLs for your site

    On the contact form, select "I have a different question", this ensures it comes through and gets assigned to me.

    https://premium.wpmudev.org/contact/

    Thanks! :slight_smile:

    Kind Regards,
    Michael

  • Michael Bissett
    • Recruit

    Hey @Cameron Underdown,

    I've tried come up with a way to wrap the code inside that template, but it looks to be more complicated than what I can cook up here.

    Part of the trick is that we're trying to protect multiple lines of code (the code that generates that product loop), when a function like the wpmudev_ppw() function is meant to be used for a function that's on the same line (as seen in the example for that function).

    From the looks of this, it seems like you'd need to come up with a way to have the loop be called by a single function, and then have that function be wrapped by the wpmudev_ppw() function.

    Suffice it to say, it'd be pretty custom.

    As to your other question:

    another problem I have is that at http://j2pstore.com/test-this, where I have the shortcode surrounding the text string, the Pay Per View plugin isn't working at all. The shortcode isn't working wherever I put it...

    I'm seeing that the page is protected properly when I view it as a visitor, did you change something in the meantime?

    Kind Regards,
    Michael

  • Cameron Underdown
    • Flash Drive

    Here's what we are trying to do, so it may help you better understand.

    A photographer goes to an amateur sports competition. He takes pictures of people there he doesn't know, gets their name, and hands them a business card telling them to go to this website and to search their name. The user goes to the site, searches, and finds their photoset. When they click to view all the photos, a paywall comes up requiring a preview fee to view the set online, which is at a specific category URL.

    The issue I see with Membership is that once you create a membership at a certain level, you have access to that URL for as long as you have the membership. We need the expiration functionality of the Pay Per View plugin, so that after 24 hours, this person has to pay again to look at their photos, no matter what kind of account they have. Also, I'm not sure if I can type in a direct URL into Membership and have it be blocked. Is that possible?

  • Jude
    • DEV MAN

    Howdy @Cameron Underdown

    Yeah. Thanks for the clarification. I now get the final use case. Membership 2 now supports finite access so you can have a memberships that lasts for a day. You will be able to block individual urls as well as block based on categories. See my screenshots.

    Also you have an option of protecting individual media items (images) based on membership level. Which you may not need if you setup using the above two rules but just a heads up.

    The way I see it .. you can do this easily with Membership 2 alone. You may not need PPV. I however dont still understand how you can restrict Person A getting Person B's pictures if they are willing to pay for it ? Im guessing you have that bit figured out already.

    Cheers
    Jude

  • Cameron Underdown
    • Flash Drive

    OK, I have solved this issue as well. But another one:

    Let's say I create a membership for each URL I want to protect (similar to Pay Per View). When I am logged in with one membership, when I go the URL protected by a different membership, I'm not given an option to buy that membership.

    Let's say I have http://URL1 under the "Private Shoot 1" Membership and http://URL2 under the "Private Shoot 2" Membership. If I'm logged in as a member having purchased the Private Shoot 1 membership, when I go to http://URL2, I'm not given the option to buy a second membership; I'm only get a message saying this content is not visible.

    Any way to allow people to buy various memberships and have those memberships expire?

  • Jude
    • DEV MAN

    Hey @Cameron Underdown

    Sorry about the delay, this somehow slipped through the gaps.

    1) You can change that message and encourage members to upgrade by giving them links / content to help . See my screenshot on where to do this

    2) Multiple memberships are possible only when the Multiple Memberships addon is enabled. Again see my screenshot on where to find it

    Cheers
    Jude

  • Cameron Underdown
    • Flash Drive

    Also, I'm wondering if there is a way to bulk edit or duplicate memberships. Without true pay per view functionality for Woocommerce, I am stuck creating memberships for each URL I want to protect, and that could be 65 different memberships for one event. Is there a way to bulk create them?

    Finally, if we have many different photographers shooting and posting on the site, could we enable these photographers to be able to create new memberships, but not edit other memberships other than the ones they created? Are their certain user permissions that exist?

  • Jude
    • DEV MAN

    Hey Cameron

    Can you open a new ticket for this ? Its best to track individual issues in modular single threads. That way we track better, resolve faster and becomes really easy to developer feedback or report bugs.

    Also primarily because older threads get dropped as nobody monitors them

    Cheers
    Jude

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.