Title: Some undefined function is causing IPN errors, need fix/patch please
Last modified: August 24, 2016

---

# Some undefined function is causing IPN errors, need fix/patch please

 *  Resolved [dealbas](https://wordpress.org/support/users/dealbas/)
 * (@dealbas)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/)
 * The page I refer to is: [http://www.hopeforthree.org/?simple_cart_ipn=1](http://www.hopeforthree.org/?simple_cart_ipn=1)
   
   I am see a Fatal error message:
 * Fatal Error: Call to undefined function wpc_handle_paypal_ipn() in /var/www/vhosts/
   hopeforthree.org/httpdocs/wp-content/plugins/wordpress-simple-paypal-shopping-
   cart/wp_shopping_cart_misc_functions.php on line 28
 * It appears that the wordpress-simple-paypal-shopping-cart is calling a function
   that is not defined which may be the reason why the IPN is failing.
 * How can I fix it???
 * [https://wordpress.org/plugins/wordpress-simple-paypal-shopping-cart/](https://wordpress.org/plugins/wordpress-simple-paypal-shopping-cart/)

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/page/2/?output_format=md)

 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993588)
 * Hi dealbas can you share your shopping cart URL.
 * Thank you
 *  Thread Starter [dealbas](https://wordpress.org/support/users/dealbas/)
 * (@dealbas)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993650)
 * There isnt a cart page. The main shop page is [http://www.hopeforthree.org/shop43](http://www.hopeforthree.org/shop43)
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993652)
 * Hi I clicked on the **Add to Cart** button for the following product **Order 
   your 2015 calendar today!** and it took me to PayPal.
 * I carried out the above test using Firefox browser.
 * Can you test on a different browser? Can you also clear the browser cache?
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993653)
 * Sorry forgot to mention no errors were displayed.
 *  Plugin Author [mra13 / Team Tips and Tricks HQ](https://wordpress.org/support/users/mra13/)
 * (@mra13)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993654)
 * Something weird is going on your site. That IPN URL should not redirect to the
   PayPal page. Have you or someone else modified any code of this plugin?
 *  Thread Starter [dealbas](https://wordpress.org/support/users/dealbas/)
 * (@dealbas)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993745)
 * I just installed it from the wordpress.org repo.
 * Here is the function the error is referring to:
 *     ```
       // Start of IPN handling (script execution)
       function wpc_handle_paypal_ipn()
       {
           $debug_log = "ipn_handle_debug.log"; // Debug log file name
           $ipn_handler_instance = new paypal_ipn_handler();
   
           $debug_enabled = false;
           $debug = get_option('wp_shopping_cart_enable_debug');
           if ($debug){
               $debug_enabled = true;
           }
   
           if ($debug_enabled)
           {
               echo 'Debug is enabled. Check the '.$debug_log.' file for debug output.';
               $ipn_handler_instance->ipn_log = true;
               //$ipn_handler_instance->ipn_log_file = realpath(dirname(__FILE__)).'/'.$debug_log;
           }
           $sandbox = get_option('wp_shopping_cart_enable_sandbox');
           if ($sandbox) // Enable sandbox testing
           {
               $ipn_handler_instance->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
               $ipn_handler_instance->sandbox_mode = true;
           }
           $ipn_handler_instance->debug_log('Paypal Class Initiated by '.$_SERVER['REMOTE_ADDR'],true);
           // Validate the IPN
           if ($ipn_handler_instance->validate_ipn())
           {
               $ipn_handler_instance->debug_log('Creating product Information to send.',true);
               if(!$ipn_handler_instance->validate_and_dispatch_product())
               {
                   $ipn_handler_instance->debug_log('IPN product validation failed.',false);
               }
           }
           $ipn_handler_instance->debug_log('Paypal class finished.',true,true);
       }
       ```
   
 * Do you see anything wrong??
 *  Thread Starter [dealbas](https://wordpress.org/support/users/dealbas/)
 * (@dealbas)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993746)
 * Okay. So IPN wasnt enabled on the paypal account. I have sinced enabled it. Now
   Im seeing this
 *     ```
       Fatal Error: Call to undefined function wpc_handle_paypal_ipn() in /var/www/vhosts/hopeforthree.org/httpdocs/wp-content/plugins/wordpress-simple-paypal-shopping-cart/wp_shopping_cart_misc_functions.php on line 28
       Description
   
       The WP Simple Paypal Shopping cart plugin code created an error that caused PHP execution to fail.
   
       The code tried to run a function that doesn't exist (wpc_handle_paypal_ipn()). This type of error is typically caused by a simple typo (is_hom() rather than is_home()), by calling a function provided by a plugin when that plugin is not activated, by calling a function before it is ready (such as calling a function before the code that creates it has run), or by using a function that no longer exists (the function may have been removed from WordPress core or the plugin/theme that previously supplied it).
   
       Solutions
   
       Invalid code modifications can cause this problem. If you have made any modifications to the plugin, remove them and try to load the site again.
       It is possible that this plugin's code is out of date and that an upgrade is available. Check with the plugin's author to see if an upgrade is available.
       There may be a conflict with another plugin running on the site. Try upgrading the other plugins on the site. A plugin conflict can be ruled out by deactivating all the other active plugins on the site and checking to see if the error still occurs.
       The WP Simple Paypal Shopping cart plugin may not have been fully uploaded. Uploading the plugin again could fix the issue. Important: If you do this, you will lose any modifications made to the plugin.
       Error Source Details
   
       Type	Plugin
       Name	WP Simple Paypal Shopping cart
       Version	v4.0.7
       Author	Tips and Tricks HQ, Ruhul Amin
       Path	/var/www/vhosts/hopeforthree.org/httpdocs/wp-content/plugins/wordpress-simple-paypal-shopping-cart
       File	wp_shopping_cart_misc_functions.php
       Other Software Details
   
       WordPress Version	4.1.1
       PHP Version	5.3.3
       Full Error Details
   
       Type	Fatal Error (E_ERROR)
       Message	Call to undefined function wpc_handle_paypal_ipn()
       File	/var/www/vhosts/hopeforthree.org/httpdocs/wp-content/plugins/wordpress-simple-paypal-shopping-cart/wp_shopping_cart_misc_functions.php
       Line	28
       Type Description	This type of error indicates that PHP cannot continue to run the code. Typical causes of this type of error are code bugs that have typos, missing or incomplete files (such as a file that was only partially uploaded), and the code using more memory than it is allowed.
       ```
   
 * What sticks out is this line
    `The code tried to run a function that doesn't 
   exist (wpc_handle_paypal_ipn()). This type of error is typically caused by a 
   simple typo (is_hom() rather than is_home()), by calling a function provided 
   by a plugin when that plugin is not activated, by calling a function before it
   is ready (such as calling a function before the code that creates it has run),
   or by using a function that no longer exists (the function may have been removed
   from WordPress core or the plugin/theme that previously supplied it).`
 * Looking at the code should “wpc_handle_paypal_ipn()” be “wpc_handle_paypal_ipn())”???
 *     ```
       function wp_cart_init_handler()
       {
           $orders_menu_permission = apply_filters('wspsc_orders_menu_permission', 'manage_options');
           //Add any common init hook handing code
           if( is_admin() && current_user_can($orders_menu_permission)) //Init hook handing code for wp-admin
           {
               wpspc_create_orders_page();
           }
           else//Init hook handing code for front end
           {
               wpspc_cart_actions_handler();
               add_filter('ngg_render_template','wp_cart_ngg_template_handler',10,2);
               if(isset($_REQUEST['simple_cart_ipn']))
               {
                   include_once('paypal.php');
                   wpc_handle_paypal_ipn();
                   exit;
               }
           }
       }
       ```
   
 *  Thread Starter [dealbas](https://wordpress.org/support/users/dealbas/)
 * (@dealbas)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993747)
 * I tried the PayPal’s IPN simulator but its showing “We could not send an IPN 
   due to an http error.”
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993750)
 * [@dealbas](https://wordpress.org/support/users/dealbas/) that is very strange.
   Can you uninstalled the plugin and install a fresh copy from wordpress.org. Then
   carry out another test.
 *  Thread Starter [dealbas](https://wordpress.org/support/users/dealbas/)
 * (@dealbas)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993866)
 * Sorry about my absence.
    Is the ipn listener [http://www.hopeforthree.org/?simple_cart_ipn=1](http://www.hopeforthree.org/?simple_cart_ipn=1)?
   Im getting an error, if you stop the page from redirecting to paypal and look
   at the details you’ll see whats going on. Ive enabled and disabled IPN on paypal
   with the notification url set to [http://www.hopeforthree.org](http://www.hopeforthree.org)
   and [http://www.hopeforthree.org/?simple_cart_ipn=1](http://www.hopeforthree.org/?simple_cart_ipn=1)
   Neither setting made a difference.
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993867)
 * Hi this post is six months old. Have you updated the plugin to the latest version?
 *  Thread Starter [dealbas](https://wordpress.org/support/users/dealbas/)
 * (@dealbas)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993868)
 * The cart works fine, thanks. But that error keeps being emailed.
 * Yea, I updated to 4.1.4. Is the ipn listener [http://www.hopeforthree.org/?simple_cart_ipn=1](http://www.hopeforthree.org/?simple_cart_ipn=1)?
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993869)
 * When I click on the link above it takes me to a redirect page and then to PayPal.
   So the link works for me.
 *  Thread Starter [dealbas](https://wordpress.org/support/users/dealbas/)
 * (@dealbas)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993870)
 * Yes the link will take you to paypal, but a email keeps being sent
 * > Please check your server that handles PayPal Instant Payment Notification (
   > IPN) messages. Messages sent to the following URL(s) are not being received:
   > [http://www.hopeforthree.org/?simple_cart_ipn=1](http://www.hopeforthree.org/?simple_cart_ipn=1)
   > If you do not recognize this URL, you may be using a service provider that 
   > is using IPN on your behalf. Please contact your service provider with the 
   > above information.
   > Once you or your service provider fix this problem, you or your service provider
   > can resend the failed messages from the IPN History page. If this problem continues,
   > PayPal may disable the IPN feature for your account.
   > Thank you for your prompt attention to this issue.
   > Thanks,
   >  PayPal
 * The error on the page says
 * > Fatal Error (hide details) (remove)
   >  The site encountered a problem that it
   > cannot recover from. Please use the following information to try to resolve
   > the problem.
   > Error Message
   > Fatal Error: Call to undefined function wpc_handle_paypal_ipn() in /var/www/
   > vhosts/hopeforthree.org/httpdocs/wp-content/plugins/wordpress-simple-paypal-
   > shopping-cart/wp_shopping_cart_misc_functions.php on line 19
   >  Description
   > The WP Simple Paypal Shopping cart plugin code created an error that caused
   > PHP execution to fail.
   > The code tried to run a function that doesn’t exist (wpc_handle_paypal_ipn()).
   > This type of error is typically caused by a simple typo (is_hom() rather than
   > is_home()), by calling a function provided by a plugin when that plugin is 
   > not activated, by calling a function before it is ready (such as calling a 
   > function before the code that creates it has run), or by using a function that
   > no longer exists (the function may have been removed from WordPress core or
   > the plugin/theme that previously supplied it).
   > Solutions
   > Invalid code modifications can cause this problem. If you have made any modifications
   > to the plugin, remove them and try to load the site again.
   >  It is possible 
   > that this plugin’s code is out of date and that an upgrade is available. Check
   > with the plugin’s author to see if an upgrade is available. There may be a 
   > conflict with another plugin running on the site. Try upgrading the other plugins
   > on the site. A plugin conflict can be ruled out by deactivating all the other
   > active plugins on the site and checking to see if the error still occurs. The
   > WP Simple Paypal Shopping cart plugin may not have been fully uploaded. Uploading
   > the plugin again could fix the issue. Important: If you do this, you will lose
   > any modifications made to the plugin. Error Source Details
   > Type Plugin
   >  Name WP Simple Paypal Shopping cart Version 4.1.4 Author Tips 
   > and Tricks HQ, Ruhul Amin Path /var/www/vhosts/hopeforthree.org/httpdocs/wp-
   > content/plugins/wordpress-simple-paypal-shopping-cart File wp_shopping_cart_misc_functions.
   > php Other Software Details
   > WordPress Version 4.3.1
   >  PHP Version 5.3.3 Full Error Details
   > Type Fatal Error (E_ERROR)
   >  Message Call to undefined function wpc_handle_paypal_ipn()
   > File /var/www/vhosts/hopeforthree.org/httpdocs/wp-content/plugins/wordpress-
   > simple-paypal-shopping-cart/wp_shopping_cart_misc_functions.php Line 19 Type
   > Description This type of error indicates that PHP cannot continue to run the
   > code. Typical causes of this type of error are code bugs that have typos, missing
   > or incomplete files (such as a file that was only partially uploaded), and 
   > the code using more memory than it is allowed.
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/#post-5993871)
 * You should only add the following [http://www.hopeforthree.org](http://www.hopeforthree.org)
   to your PayPal IPN?
 * I know you mentioned above that you already added the URL I mentioned above. 
   If this is not working then there is something wrong in your PayPal account or
   your website.

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/page/2/?output_format=md)

The topic ‘Some undefined function is causing IPN errors, need fix/patch please’
is closed to new replies.

 * ![](https://ps.w.org/wordpress-simple-paypal-shopping-cart/assets/icon-128x128.
   png?rev=2722490)
 * [Simple Shopping Cart](https://wordpress.org/plugins/wordpress-simple-paypal-shopping-cart/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-simple-paypal-shopping-cart/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-simple-paypal-shopping-cart/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-simple-paypal-shopping-cart/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-simple-paypal-shopping-cart/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-simple-paypal-shopping-cart/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [ipn](https://wordpress.org/support/topic-tag/ipn/)
 * [undefined function](https://wordpress.org/support/topic-tag/undefined-function/)

 * 17 replies
 * 3 participants
 * Last reply from: [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/some-undefined-function-is-causing-ipn-errors-need-fixpatch-please/page/2/#post-5993873)
 * Status: resolved