Reveal/Hide Pro Header based on WooCommerce Membership

I use the official WooCommerce Memberships plugin (https://woocommerce.com/products/woocommerce-memberships/) to create different experiences for my shoppers.

I’d like to use a particular header for a specific membership using the Assignment > Conditions options. It seemed like I had it working in development, but when I went to implement it, I had no luck.

Is this something you all can take a look at? The solution would work perfectly for what I’m attempting to do.
Thank you for all the great work you all do!

Hi @gstertz,

Thanks for reaching out!

Would you mind to sharing your credentials so that we can check your setup? To do that, please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password

You can find the Secure Note button at the bottom of your posts.

Thank you.

Hello @gstertz,

Please share your WordPress login URL since you have not given the login URL of your site because of that we are not able to determine which site login details you have given to us.

Thanks

Sorry about that! :man_facepalming: I just sent you another secure note. Thanks!

Hello @gstertz,

Regretfully the given credentials are not working for us. Please double-check it. In the meantime, kindly create two separate bars in your custom header and then add a condition for the membership. if the condition is true, the bar will display. In the 2nd bar, you can display it if the condition is false.

Best Regards.

My apologies once again. We recently introduced SSO to the site which changed some of the login procedures. I edited the secure note with a working login.

Hello @gstertz,

Are you using the given credentials as your login as well? See the secure note.

You will need to edit the User Profile and add a Membership first because right now it does not have any memberships.

Once you have added a membership manually, you can add your condition and test it out.

Kindly let us know how it goes.

I was previously using a different membership to test, but couldn’t due to the SSO changes.

I just disabled the SSO temporarily and included the second test membership on the Secure Note along with a specific login URL. That test membership login has the “New Agent” status that I’m trying to use to test the efficacy of the condition.

Hello @gstertz,

The WooCommerce Memberships plugin uses post type in creating the membership plans custom post type. This custom post type is then detected by the condition. The Membership Plan (Specific) will only work if you will be viewing the Membership Plan post type.

What you have in mind, using the Condition and Assignment feature will not work because the needed information is about whether the user is a member or not and what is his membership plan. You should be using a condition that determines the user information which is not present at the moment. You are only limited to check if the user is logged in/out and the role of the user. The Condition and Assignment feature does not have access to the membership plan. You may need to find other alternatives to accomplish what you have in mind.

Hope this makes sense.

@ruenel, Thank you very much. I had a hunch that this was the case, but thank you for looking at it closer for me and confirming. I’ll see what other options there are to accomplish this.

You are most welcome.

I think I’m trying to do the same thing and running into the same problem. I’m also running WooCommerce Memberships and I have three different headers:

  1. for logged out users/customers/members
  2. for logged in customers
  3. for logged in members

Previously I had my developer make these assignments, but I thought it might now be possible to do it via conditions and assignments, but it doesn’t seem possible. Would love to have this option!

Hello @sbjess,

At this time we kindly ask that you open up your issue in a separate thread. The longer threads get in the forum, they become more difficult to support as they tend to drift off topic and they also make it troublesome for users trying to search for solutions. Keeping threads relevant to their original inquiry ensures that we can keep better track of what has been resolved and that users can more effectively find answers to similar issues they might be experiencing.

Just so you know, please be advised that the WooCommerce Memberships is not fully supported for the header/footer builder.

Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.