latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Using Pro BillingCancelation Form Shortcode

Home Forums Community Forum Using Pro BillingCancelation Form Shortcode

This topic contains 3 replies, has 3 voices. Last updated by  Jason (Lead Developer) 3 years, 11 months ago.

Topic Author Topic
Posted: Saturday Jan 26th, 2013 at 4:30 am #39637
Hamid
Username: zawiyaprojects

Hello Support,

Last few days I have been tweaking the heck out of my website. The more I get into s2member, the more I love it and appreciate the efforts put into it.

I am setting up my members option page and want to include the recurring payment cancel form to it.

The shortcode I’m using is

[s2Member-Pro-PayPal-Form cancel="1" desc="" captcha="0" /]

The shortcode works fine but I notice that when a free user accesses the page, the form displays the following message:

Nothing to cancel. You're NOT a paid Member.

which is great.

And when a paid member (who does NOT have a recurring payment) accesses the page, the message reads,

Nothing to cancel. You have NO recurring fees.

which is also great; however, in both cases, the words “Confirm Cancellation” and the “Submit button” appear below the message which makes it confusing (i.e. if I don’t qualify to cancel recurring payments, why am I presented with a confirmation button?)

Is there any way to hide this “Confirm Cancellation” text and submit button to users who DO NOT qualify to cancel there recurring payment?

Thanks
Hamid

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Tuesday Jan 29th, 2013 at 8:21 pm #39948
Bruce
Username: Bruce
Staff Member

Thank-you for your inquiry. ~ We appreciate your patience

s2Member’s cancellation form is not meant to be displayed to users that cannot cancel. The “The Nothing to cancel. You’re NOT a paid Member.” message is only meant to deter users that see this form by error.

Instead of relying on s2Member’s messages here, we recommend using the Shortcode Conditionals available in the Dashboard to hide the cancellation form is the user is a free member.

Dashboard -› s2Member® -› API / Scripting -› Simple/Shortcode Conditionals

Assuming that you are using Paid Subscription for upgrading members, you should NOT need to hide the cancellation for specific members that are above level 0, because they are always going to need the cancellation form.

If however, you do need to do so, you may want to check if the user’s Paid Subscr. ID is set to decide if the user should see the form, using the Advanced PHP conditionals.

Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals

Posted: Wednesday Jan 30th, 2013 at 3:45 am #39989
Hamid
Username: zawiyaprojects

Thanks for your reply Bruce but I think you may have misunderstood.

I want the messages that appear TO appear to the users, regardless of membership type (the way it currently does).

What I don’t want to appear is the text that is displayed under these messages; namely, the Confirm Cancellation text and the Submit button.

Here is what currently gets displayed to a non-recurring member:
————-

Nothing to cancel. You have NO recurring fees.

Confirm Cancellation

Submit Button

————–

What I am looking for is if a user has “nothing to cancel” then I simple want to hide the “submit button” and “confirm cancellation” text. But if they CAN cancel recurring payments then the submit button and confirm cancellation text should appear. I hope it is clear now.

Thanks

Posted: Saturday Feb 2nd, 2013 at 2:41 am #40331
Staff Member

Thanks for the heads up on this thread :-)

One way to accomplish this, would be to setup a custom Pro Form template for cancellations.

Take the default Pro Form template found here:
/s2member-pro/includes/templates/forms/paypal-cancellation-form.php

Adding conditionals to the messages and/or buttons that it displays.

<?php if(!current_user_is('subscriber')): ?>
	// Display the button, etc.
<?php endif; ?>

See also: Knowledge Base » s2Member® Pro Forms

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

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.