Title: How do I set default access settings?
Last modified: August 14, 2022

---

# How do I set default access settings?

 *  Resolved [Lethalmiko](https://wordpress.org/support/users/lethalmiko/)
 * (@lethalmiko)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-set-default-access-settings/)
 * I set up a custom payment gateway that handles manual payments whereby an admin
   has to activate. It creates an order with “pending” state but once that order
   is created, the user has immediate access to locked content which is not the 
   expected behaviour. I expected that by default, access is restricted whenever
   levels are set on a post and an order is in the pending state. So how do I set
   the plugin to deny access by default until the order status is set to successful
   by an admin?
 * NOTE: I have active the Approvals Add On.
    -  This topic was modified 3 years, 10 months ago by [Lethalmiko](https://wordpress.org/support/users/lethalmiko/).

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Support [Kim White](https://wordpress.org/support/users/kimwhite/)
 * (@kimwhite)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-set-default-access-settings/#post-15917158)
 * Hello [@lethalmiko](https://wordpress.org/support/users/lethalmiko/),
    Thank 
   you for using Paid Memberships Pro.
 * Pending orders should not have access to your content, only to their account 
   page and profile information.
 * For the Approvals Add On, we are not allowed to support any premium plugin-related
   issues or questions according to the WordPress.org support guidelines – [https://wordpress.org/support/guidelines/](https://wordpress.org/support/guidelines/)
 * Please can you open a ticket on [https://www.paidmembershipspro.com/support](https://www.paidmembershipspro.com/support),
   and someone from our team will continue to assist you?
 * Thank you for understanding.
 * Kim W
 *  Thread Starter [Lethalmiko](https://wordpress.org/support/users/lethalmiko/)
 * (@lethalmiko)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-set-default-access-settings/#post-15917413)
 * Thanks for the reply.
 * I only mentioned Approvals Add On in case it is relevant information to my issue,
   not that I am asking for support on that. My experience is that users have access
   just by creating a pending order and that is not the expected behaviour. That
   is a core plugin matter.
 * My question thus remains unanswered.
    -  This reply was modified 3 years, 10 months ago by [Lethalmiko](https://wordpress.org/support/users/lethalmiko/).
 *  Plugin Author [Andrew Lima](https://wordpress.org/support/users/andrewza/)
 * (@andrewza)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-set-default-access-settings/#post-15919381)
 * We do not restrict access based on a user’s order status if they already have
   an active membership. Their membership may not be applied to their WordPress 
   account if their order isn’t successful during the checkout process.
 * Regarding your custom coded gateway, you would need to write a function to restrict
   access for orders that are on the pending status. You would have to get the user’s
   latest order, or any order that is in pending mode and restrict their access 
   with the `pmpro_has_membership_access_filter` – [https://www.paidmembershipspro.com/hook/pmpro_has_membership_access_filter/](https://www.paidmembershipspro.com/hook/pmpro_has_membership_access_filter/)
 * If the member’s order is pending, and they have a membership level you may set
   the `$hasaccess` parameter to false.
 * We are not allowed to support or answer any pre-sale/possible conflicts regarding
   to a Plus Add On and those questions should be immediately redirected to our 
   website support on [https://www.paidmemebrshipspro.com/support](https://www.paidmemebrshipspro.com/support)
   as mentioned it breaks the WordPress guidelines.
 * I hope this helps get you started, thank you for understanding.
 *  Thread Starter [Lethalmiko](https://wordpress.org/support/users/lethalmiko/)
 * (@lethalmiko)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-set-default-access-settings/#post-15919541)
 * Thank you [@andrewza](https://wordpress.org/support/users/andrewza/) for your
   guidance. However, please note that in my testing, the user does NOT have an 
   active subscription initially. All they are doing is registering and then creating
   an order that goes into a pending state and yet they have access immediately 
   that pending order is created.
 * I do not believe this should be the case and the `$hasaccess` parameter should
   be set to false by default for all users unless they have a successful order,
   without having to code a custom access function. In fact, for the pay by check
   addon, this is precisely what happens as orders go into a pending state but no
   access is granted until the admin marks the order as successful. May I suggest
   that you consider adding this no-access-by-default setting to the core plugin
   codebase. Or maybe write a guide on your website since it is a core plugin issue.
 * And finally, I am not asking for support for any paid addons, so I am not sure
   why there is a constant reference to it. I reiterate that I only mentioned the
   addon to give extra information that may be deemed relevant to my problem.
 *  Plugin Author [Andrew Lima](https://wordpress.org/support/users/andrewza/)
 * (@andrewza)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-set-default-access-settings/#post-15919561)
 * Thanks for the feedback, we will consider it. However, as mentioned we restrict
   access based initially on the membership level status attached to the user which
   gives admins flexibility of changing levels without creating orders.
 * We have to mention the WordPress guidelines as we have to strictly follow these
   while supporting our free users on this channel.
 * For now, I cannot guarantee order restriction will be included into core and 
   you will need to create a custom solution similar to the Pay By Check Add On 
   as you’ve referenced.
 *  Thread Starter [Lethalmiko](https://wordpress.org/support/users/lethalmiko/)
 * (@lethalmiko)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-set-default-access-settings/#post-15919691)
 * Another idea I suppose is to put a switch in the settings to enable an admin 
   decide the default setting for access. Perhaps that is a good compromise between
   the two positions. Thanks for your help.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘How do I set default access settings?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/paid-memberships-pro_f1dacb.svg)
 * [Paid Memberships Pro - Content Restriction, User Registration, & Paid Subscriptions](https://wordpress.org/plugins/paid-memberships-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/paid-memberships-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/paid-memberships-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/paid-memberships-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/paid-memberships-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/paid-memberships-pro/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Lethalmiko](https://wordpress.org/support/users/lethalmiko/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-set-default-access-settings/#post-15919691)
 * Status: resolved