Update the value of a constant

You can’t alter a constant once it is defined. That is how PHP works. Don’t fight it. The good news is that you should not be using a constant at all. Use options. // get your value // the second parameter is the default $enable_paypal = get_option(‘enable_paypal’,true); // set your value based on, I assume, … Read more

Paypal Post IPN handeling nightmare

I ended up using kind of a hack. I made a hidden field that was populated with the user ID. I then used this to update metas and what not on a successful IPN and or successful payment. Ie: add_filter(“gform_paypal_post_ipn”, “update_order_status”, 10, 4); function update_order_status($ipn_post, $entry, $config, $cancel){ // if the IPN was canceled, don’t … Read more