Support » Plugin: Paid Memberships Pro » All pages being redirected to / from https

  • Resolved ammbo


    Great plugin with excellent functionality. However, I have some sections of my site that need to be secure and PMP seems to redirect all pages to http regardless of whether that page has anything to do with the plugin. This is pretty invasive behavior, it should not redirect pages it does not create.

    As it is, I am unable to use any other plugins to manage ssl due to redirect loops. The culprits appear to be these functions that hook into the WP init actions:

    add_action(‘wp’, ‘pmpro_besecure’, 2);
    add_action(‘login_init’, ‘pmpro_besecure’, 2);

    I commented both out and now I am able to specify which pages need to be secure again using the WordPress HTTPS plugin, including the PMP pages. The way the function pmpro_besecure is written will redirect every page on the site to or from http or http.

    My question is whether there is a better way to do this without modifying the core files. Second question would be whether this will break the plugin.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jason Coleman


    This won’t break the plugin if you are managing HTTP/HTTPS behavior yourself. We try to handle it for people in a default way and allow savvy users like yourself to override it.

    The better way to disable PMPro’s HTTP/HTTPS handling (so that you can upgrade the plugin without overwriting your changes) is to use this code:

    function remove_pmpro_https_stuff()
    remove_action('wp', 'pmpro_besecure');
    remove_action('login_init', 'pmpro_besecure');
    add_action('init', 'remove_pmpro_https_stuff');

    Note that PMPro is still going to filter URLs written by the page to use HTTPS if the site is loaded via HTTPS. You can remove more filters to disable this if you need to.

    You can also use the pmpro_besecure filter to programtically tell PMPro if you think a page should be secure or not. Or add the “besecure” custom field set to “1” or “true” to tell PMPro to load that page over HTTPS.

    Hope this helps.

    Hi ammbo,

    Because Jason answered your question and it has to do with customization beyond the scope of the basic plugin functions, I’m going to close this thread.

    If you would like more guidance or hands on help implementing this solution with Paid Memberships Pro, please sign up at

    Tried adding the code the author mentioned in my themes functions file and a couple other places however it did not work so it seems the commenting method is the only way to go about it

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘All pages being redirected to / from https’ is closed to new replies.