Determining sales completed status

Is there any way I can check if the specific post or page is paid already in a template file (such as conditional tag like is_paid()?)? The reason I do this is because I would like to show a different style for the whole page if that page content is paid.

  • be_stephen
    • WPMU DEV Initiate

    For example, I have a page that can be view after paid. I would like to show a advertisement if a user that didn't pay for that specific page yet but hide it if the user pay it already. How do I do that in the page template in PHP?

    if (!is_paid()) {
    // todo: show the advertisement HTML

    I hope this clarify a bit more for you.

  • aecnu
    • WP Unicorn

    Greetings be_stephen,

    Sorry for the delay in a reply here which was clearly caused at least a two day delay in response by your own hand. I shall get us a copy and paste to explain why this is and then jump into the custom coding you mentioned above.

    ****Please note:****
    One reason in this particular ticket here that we are having delays in a response is because of the way the ticket system works. The ticket system see's every reply as well a reply ... and then changes it's priority in the support que to include ticket aging.

    Therefore it may not show up on our screens as early as it would under normal conditions. It is usually in your best interest to not bump tickets or reply to them unless there is something significant to add.
    ****Please note****

    Yes you have clarified this now which as linked to above to the post my Boss wrote, custom coding is not something we do here though we do try to help if we can.

    With that said and since I am not a coder myself, I will see if I can get the lead developer in here with his invaluable insight into this plugin for his advice/advise for us.

    If that does not work it is time to head over to the jobs board to hire somebody that is competent enough to code this for you or perhaps, but first lets se what we can get done here.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Hakan
    • The Incredible Smush


    We don't have such a function.

    You can check the cookie with name "pay_per_view" if it is set or not. It includes an array with post_id as a parameter.

    To see how it is used, please search for $_COOKIE["pay_per_view"] in the codes.

    Or if you don't mind to distinguish if client paid for this or another page, you can simply use:

    if ( !isset( $_COOKIE["pay_per_view"] ) ) {
    // Show ad


  • aecnu
    • WP Unicorn

    Greetings be_stephen,

    We have not heard back from you as to the status of this issue.

    If you are still having an issue please let us know so that we may try to get you fixed up as soon as possible by choosing to check mark this ticket as unresolved below and posting any new errors or symptoms you are noticing.

    This action will also bring your ticket up front back in plain view again within the ticket system.

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.