Support

Home Forums Event Espresso Premium PHP critical error in correlation with WooCommerce PayPal & Featherlight plugins

PHP critical error in correlation with WooCommerce PayPal & Featherlight plugins

Posted: August 25, 2023 at 1:02 pm

Viewing 7 reply threads


webmike

August 25, 2023 at 1:02 pm

When I click on an individual transaction, I get the following error below.

I had this issue with 5.0.7 only since yesterday, since I updated the WooCommerce PayPal Payments plugin and the WP Featherlight plugin to the latest versions. So I updated EE to 5.0.9.p and still have the issue.

So I deactivated these 2 plugins and the issue went away. Seems like there is a correlation with those 2 plugins.
I need those 2 plugins, so leaving them deactivated is not an option.

I’m running the latest WP version and PHP 7.4. Reading from the forum, I guess updating PHP would not fix it.

I feel uneasy about reuploading EE 5.0.9.p. Can that mess anything up?

What about just deactivating and reactivaning EE. Will that mess anything up?

Thanks,
Mike

Argument 2 passed to WooCommerce\PayPalCommerce\Subscription\SubscriptionModule::WooCommerce\PayPalCommerce\Subscription\{closure}() must be an instance of WP_Post, null given, called in [website-path]/wp-includes/class-wp-hook.php on line 310 and defined in [website-path]/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-subscription/src/SubscriptionModule.php:230 Stack trace: #0 [website-path]/wp-includes/class-wp-hook.php(310): WooCommerce\PayPalCommerce\Subscription\SubscriptionModule->WooCommerce\PayPalCommerce\Subscription\{closure}(‘page’, NULL) #1 [website-path]/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) #2 [website-path]/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 [website-path]/wp-content/plugins/event-espresso-core-reg/core/admin/templates/admin_details_wrapper.template.php(16): do_action(‘add_meta_boxe in [website-path]/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page.core.php on line 1156


webmike

August 25, 2023 at 1:02 pm

When I click on an individual transaction, I get the following error below.

I had this issue with 5.0.7 only since yesterday, since I updated the WooCommerce PayPal Payments plugin and the WP Featherlight plugin to the latest versions. So I updated EE to 5.0.9.p and still have the issue.

So I deactivated these 2 plugins and the issue went away. Seems like there is a correlation with those 2 plugins.
I need those 2 plugins, so leaving them deactivated is not an option.

I’m running the latest WP version and PHP 7.4. Reading from the forum, I guess updating PHP would not fix it.

I feel uneasy about re-uploading EE 5.0.9.p. Can that mess anything up?

What about just deactivating and reactivating EE. Will that mess anything up?

Thanks,
Mike

Argument 2 passed to WooCommerce\PayPalCommerce\Subscription\SubscriptionModule::WooCommerce\PayPalCommerce\Subscription\{closure}() must be an instance of WP_Post, null given, called in [website-path]/wp-includes/class-wp-hook.php on line 310 and defined in [website-path]/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-subscription/src/SubscriptionModule.php:230 Stack trace: #0 [website-path]/wp-includes/class-wp-hook.php(310): WooCommerce\PayPalCommerce\Subscription\SubscriptionModule->WooCommerce\PayPalCommerce\Subscription\{closure}(‘page’, NULL) #1 [website-path]/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) #2 [website-path]/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 [website-path]/wp-content/plugins/event-espresso-core-reg/core/admin/templates/admin_details_wrapper.template.php(16): do_action(‘add_meta_boxe in [website-path]/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page.core.php on line 1156


Tony

  • Support Staff

August 25, 2023 at 3:14 pm

Hi there,

When I click on an individual transaction, I get the following error below.

An individual transaction within Event Espresso itself?

I feel uneasy about reuploading EE 5.0.9.p. Can that mess anything up?

As in reinstalling it over the current version? No, it wont mess anything up but I also don’t think it will fix the issue here.

What about just deactivating and reactivating EE. Will that mess anything up?

No, it won’t mess anything up, but again it’s unlikely to fix the issue based on your error log.

What is happening is the Woo PayPal plugin is declaring something within a hook must be a WP_Post object, but when the hook is running within EE it’s not… so it throws a fatal.

This is something we will need to investigate further but in the meantime, I’ve put together a plugin which should fix that issue on your site.

Download THIS.

Add that in Dashboard -> Plugins -> Add new -> Upload plugin, install and activate it.

Does that fix the error?

What that plugin does is replace a template file within EE on the fly, the new template file creates a fake WP_Post object to keep the above code happy when running within EE.


webmike

August 25, 2023 at 8:43 pm

Hi Tony,

yes, within Event Espresso itself, i.e in the admin (/wp-admin/admin.php?page=espresso_transactions&action=view_transaction&TXN_ID=xxx&view_transaction_nonce=xxxxxxx)

Thanks so much for sending me a temporary fix via a plugin.

I installed the plugin and there is no more error regarding Woocommerce, so that’s fixed, however it still throws and error regarding WP Featherlite.

Fatal error: Uncaught TypeError: Argument 1 passed to WP_Featherlight_Admin_Meta::options_callback() must be an instance of WP_Post, null given, called in [website-path]/wp-admin/includes/template.php on line 1443 and defined in [website-path]/wp-content/plugins/wp-featherlight/admin/class-meta.php:156 Stack trace: #0 [website-path]/wp-admin/includes/template.php(1443): WP_Featherlight_Admin_Meta->options_callback(NULL, Array) #1 [website-path]/wp-content/plugins/ee-site-specific-plugin-templates/templates/admin_details_wrapper.template.php(68): do_meta_boxes(Object(WP_Screen), ‘side’, NULL) #2 [website-path]/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Template.helper.php(403): include(‘[website-path]’) #3 [website-path]/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page.core.php(2833): EEH_Template::display_template(‘[website-path]’, Array, true) #4 /home1/ in [website-path]/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_Page.core.php on line 1156


Tony

  • Support Staff

August 28, 2023 at 3:59 am

Oh, the error from WP Featherlite wasn’t in the original post so I assumed it was the same issue.

Try THIS version.

Upload that through Dashboard -> Plugins -> Add new -> Upload Plugin.

Replace the current version and it should prevent the above.


webmike

August 29, 2023 at 7:06 pm

Thank you! It seems that the latest WP update fixed the Featherlight error, however I get another error after applying a refund. I’ll see if this fixes it. If not, I’ll post the error.


Rio

  • Support Staff

August 30, 2023 at 1:11 am

Awesome, if you find anything wrong, feel free to send it here.

thanks


webmike

September 5, 2023 at 1:39 pm

So even after installing your plugin fix, I still get an error after applying a refund, so after clicking on “Apply Refund” on this screen.

The refund gets processed, registrations canceled, message sent, but no confirmation message comes up, instead the error.

See error here.


webmike

September 5, 2023 at 1:49 pm

Here is the error again in text form:

NEW REG PAID AMOUNT :

float(0)

/wp-content/plugins/event-espresso-core-reg/core/db_classes/EE_Registration.class.php line no: 2576

NEW REG PAID AMOUNT :

float(0)

/wp-content/plugins/event-espresso-core-reg/core/db_classes/EE_Registration.class.php line no: 2576

NEW REG PAID AMOUNT :

float(0)

/wp-content/plugins/event-espresso-core-reg/core/db_classes/EE_Registration.class.php line no: 2576

Warning: Cannot modify header information – headers already sent by (output started at /wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Debug_Tools.helper.php:609) in /wp-includes/pluggable.php on line 1435

Warning: Cannot modify header information – headers already sent by (output started at /wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Debug_Tools.helper.php:609) in wp-includes/pluggable.php on line 1438


Tony

  • Support Staff

September 5, 2023 at 2:48 pm

My plugin won’t fix the above as it’s in a completely different section to what that plugin relates to.

The above ‘error’ isn’t actually an error, its from some Debug code we have within Event Espresso but by default it should not (and for me is not) be output to the page so I’m not sure why it is for you.

I’ll create a ticket to fix the above in the next release, in the meantime the quickest fix for you is to edit the file and comment out the line causing this:

/wp-content/plugins/event-espresso-core-reg/core/db_classes/EE_Registration.class.php

Line 2575 has:

\EEH_Debug_Tools::printr($paid, 'NEW REG PAID AMOUNT', __FILE__, __LINE__);

Add // to the beginning of that line:

// \EEH_Debug_Tools::printr($paid, 'NEW REG PAID AMOUNT', __FILE__, __LINE__);

Viewing 7 reply threads

The support post ‘PHP critical error in correlation with WooCommerce PayPal & Featherlight plugins’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso