Title: Using the shortcode
Last modified: September 8, 2017

---

# Using the shortcode

 *  Resolved [GuyB9290](https://wordpress.org/support/users/guyb9290/)
 * (@guyb9290)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/using-the-shortcode-2/)
 * Hello,
 * Great plugin and really easy to use and setup.
    I’m trying to use the Shortcode
   with parameters in my functions.php file like this: _function action\_woocommerce\
   _before\_add\_to\_cart\_button( ) { echo do\_shortcode ( ‘[wp\_paypal\_payment\
   _box options=”Event promoted once – £5 1:5.00|Event promoted 2 or more times –
   £10 2:10.00″]’ ); return;} add\_action( ‘woocommerce\_before\_add\_to\_cart\_button’,‘
   action\_woocommerce\_before\_add\_to\_cart\_button’, 10, 0 );
 * Nothing happens, and I’m sure I’m doing something wrong with the way I pass the
   parameters but can’t figure out how to fix it – can you help me please?
    Thanks
   Guy

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

 *  Plugin Author [mra13](https://wordpress.org/support/users/mra13/)
 * (@mra13)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/using-the-shortcode-2/#post-9493191)
 * What happens if you do an echo inside that function just to see if that function
   is actually getting executed? If that action hook is not getting executed then
   the shortcode will never show.
 *  Thread Starter [GuyB9290](https://wordpress.org/support/users/guyb9290/)
 * (@guyb9290)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/using-the-shortcode-2/#post-9493777)
 * Thanks for getting back to me, I worked it out already. It seems that the Shortcode
   doesn’t like the ‘reference’ parameter
    This is what worked for me: _echo do\
   _shortcode(‘[wp\_paypal\_payment\_box email=”sally@herefordequestrian.co.uk” 
   options=”Event promoted once for 1 month:5.00|Event promoted 2 or more times 
   for 2 months:10.00″ currency=”GBP” reference=”Event Name & Date” return=”[http://www.herefordequestrian.co.uk/successful-payment/&#8221](http://www.herefordequestrian.co.uk/successful-payment/&#8221);
   cancel\_url=”[http://www.herefordequestrian.co.uk/cancelled-payment/&#8221](http://www.herefordequestrian.co.uk/cancelled-payment/&#8221);
   new\_window=”1″]’);_ Thanks for getting back to me Guy

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

The topic ‘Using the shortcode’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-easy-paypal-payment-or-donation-accept-plugin/
   assets/icon-128x128.png?rev=2722524)
 * [Easy Accept Payments via PayPal](https://wordpress.org/plugins/wordpress-easy-paypal-payment-or-donation-accept-plugin/)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-easy-paypal-payment-or-donation-accept-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-easy-paypal-payment-or-donation-accept-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-easy-paypal-payment-or-donation-accept-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-easy-paypal-payment-or-donation-accept-plugin/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [GuyB9290](https://wordpress.org/support/users/guyb9290/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/using-the-shortcode-2/#post-9493777)
 * Status: resolved