# LearnDash button - what's wrong with this code?

**URL:** <https://www.phphelp.com/t/learndash-button-whats-wrong-with-this-code/31750>\
**Category:** Help with WordPress\
**Created:** [May 1, 2020, 2:09pm UTC](https://www.phphelp.com/t/learndash-button-whats-wrong-with-this-code/31750 "2020-05-01T14:09:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![isleek](https://www.phphelp.com/user_avatar/www.phphelp.com/isleek/32/3100_2.png) [@isleek](https://www.phphelp.com/u/isleek)\
**Post date:** [May 1, 2020, 2:09pm UTC](https://www.phphelp.com/t/learndash-button-whats-wrong-with-this-code/31750/1 "2020-05-01T14:09:33Z")

</div>

Hey all, found this code online which supposedly does exactly what I need… but it has errors. I’m no programmer so I don’t know how to fix what it asks. Can you help? Here it goes:

[https://gist.githubusercontent.com/lucanos/bb53808e34f78e85c7b17fec32793589/raw/bbd475bcd1cda8aa4d775b7c33e441226fa07296/functions.php](https://gist.githubusercontent.com/lucanos/bb53808e34f78e85c7b17fec32793589/raw/bbd475bcd1cda8aa4d775b7c33e441226fa07296/functions.php)

---

<div class="post-metadata">

**Author:** ![benanamen](https://www.phphelp.com/user_avatar/www.phphelp.com/benanamen/32/287_2.png) [@benanamen](https://www.phphelp.com/u/benanamen)\
**Post date:** [May 1, 2020, 5:35pm UTC](https://www.phphelp.com/t/learndash-button-whats-wrong-with-this-code/31750/2 "2020-05-01T17:35:09Z")

</div>

_what’s wrong with this code?_

1. It’s not your code. We are here to help with code YOU wrote.

_it has errors_

1. That is often the case when you just grab something off the internet.

_I’m no programmer_

1. So, are you wanting to become one or are you looking to hire someone to debug third-party code?
