• Resolved welcomeblack

    (@welcomeblack)


    I’m using PPWP lite partial protection using shortcodes. Using the WordPress built-in editor, the construct

    > [ppwp passwords=”pass1 pass2″]
    > super secret stuff
    > [/ppwp]

    works perfectly. The page renders with the password field, and when “pass1” is entered in the field the super secret stuff is shown. Awesome! However, I’m trying to wrap your shortcodes in my own shortcodes in order to pass dynamically-generated passwords to PPWP. In functions.php I have written

    >function outer($atts, $content=null){
    >
    > //get passwords from server: secret.pwd currently contains “pass1 pass2 ”
    > $new_pwds = file_get_contents(“/path/to/server/secret.pwd”);
    >
    > $html = <<<EOD
    >[ppwp passwords=”$new_pwds”]
    >$content
    >[/ppwp]
    >EOD;
    >
    > return do_shortcode($html);
    >}
    >add_shortcode( ‘outer_block’ , ‘outer’ );

    Now my construct in the WP editor is

    > [outer_block]
    > super secret content
    > [/outer_block]

    which, I feel, almost works as I want it to. The super secret stuff is hidden, and the password entry is shown. But when I submit “pass1” in the password field, I get the usual error message “Please enter the correct password!”

    Is there a hook that I have to include? Am I forgetting something basic? Is this Pro-only functionality? Please let me know ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @welcomeblack,

    Thanks for reaching out to us.

    Don’t worry. We’ve always got your back.

    To assist you better, could you please provide us with a sample protected URL and a password to double-check?

    Does it work if you replace “$new_pwds” in [ppwp passwords=”$new_pwds”] with a specific password, by the way?

    You might also want to drop us an email at hello(at)preventdirectaccess.com so that our team can support you faster.

    Thread Starter welcomeblack

    (@welcomeblack)

    Since it’s been almost two weeks since I started this thread, I figured I’d give some updates from my perspective before this gets marked as resolved for inactivity.

    I emailed their customer support team, mentioning that the above suggestion (changing the inner shortcode to [ppwp passwords=”1234″]) didn’t work. They asked for admin access in order to directly check my site’s setup, which I granted to them for 3 days, then another 3 days when I saw they were still working on the issue. When the 6 days was up I’d heard nothing so I emailed them again to see if I could let the admin access expire. They confirmed that they were able to replicate my issue with their own testing site, and that they would continue working on the problem.

    Let me know when there’s any news!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Nest PPWP Inside Other Shortcode’ is closed to new replies.