EasyPayPal WordPress plugin fix
This is just a small nerd post for those of you who may be trying to use the beta 3.0 series of EasyPayPal for WordPress. The script has a very common bug in it that shows up if you don’t configure any categories to be hidden unless purchased in the options. The fix is very simple and I’m rather amazed it hasn’t been committed yet. All that has to be done is to initialize the $cats variable to an empty array since the variable is only created inside a conditional (bad coding!).
Anyways, here’s a patch you can apply to fix the bug:
--- easypaypal.php 2008-02-11 21:24:24.000000000 -0500
+++ easypaypal.php 2008-02-11 21:23:39.000000000 -0500
@@ -211,6 +211,7 @@
if(!EasyPayPal_BypassCheck())
{
+ $cats = array();
$post_ID = $post->ID;
$temp = get_option("easypaypal_categories");
Just copy this in to a file and use patch -p0 < file to apply the patch – or just find line 211 and add in the line indicated with the + symbol.