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.

Adding Values to the Paypal Short Code

Home Forums Community Forum Adding Values to the Paypal Short Code

This topic contains 4 replies, has 2 voices. Last updated by  Tracy Hickman 3 years, 11 months ago.

Topic Author Topic
Posted: Wednesday Jan 23rd, 2013 at 6:11 pm #39243

I understand it is better practice to use the shortcode for Paypal subscription sales than the resulting PHP snippet. However, my subscriptions also contain a physically shipped component which requires that I (1) require the purchaser’s physical address and (2) figure shipping costs into their subscription. All of this normally would be accomplished by inserting the following code into the PHP of the paypal form:

<input type="hidden" name="no_shipping" value="2" />
<input type="hidden" name="weight" value="3" />

This would require Paypal to get the shipping address, give determine shipping costs from the weight value of ‘3.’

Is there any way of passing along these values to Paypal from inside the short code generated for the button?

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Thursday Jan 24th, 2013 at 5:00 am #39334
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

The no_shipping directive is supported by s2Member®. The weight directive is not however. Please see: Dashboard -› s2Member® -› PayPal® Buttons -› Shortcode Attributes (Explained)

ns="1" The no_shipping directive. Possible values: 0 = prompt for an address, but do not require one, 1 = do not prompt for a shipping address, 2 = prompt for an address, and require one. Not valid when cancel="1".
Posted: Thursday Jan 24th, 2013 at 11:45 am #39420

I saw the ‘no_shipping’ directive in the shortcode but since our subscription includes a physical product, I also have to include the ‘weight’ directive to PayPal. This means that I cannot use the short code for these purchases and must, instead, use modify the HTML code and use that instead.

I might suggest this single shortcode addition as a valuable capability in the future. Even if it were not a menu option for the plugin, those of us who deal with both subscriptions and associated physical product (buy the book and receive this subscription as well) would greatly enjoy it’s convenience.

Posted: Friday Jan 25th, 2013 at 7:20 pm #39565
Staff Member

Thanks for the follow-up :-)

I’m adding this to our list. Thank you.

Posted: Friday Jan 25th, 2013 at 9:23 pm #39587

I appreciate it. I’ve been battling work around for two days and finally gave up. The PHP in the HTML code is constantly being corrupted by WordPress and/or my theme every time I go to edit it. In the end I have had to make all my payment buttons for that site on the Paypal site, have people who make the purchase sign up for a level 0 account and then manually change their account to their subscription level. It’s not a very good work around but at least it allows me to complete sales.

I think s2member is an amazing plugin and ideal for my digital sales sites … I hope you can see the need for adding that one variable to the shortcode … it would certainly make my life vastly simpler.

Viewing 4 replies - 1 through 4 (of 4 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.