Hook on wp_handle_upload throws fatal error
-
I am using wp_handle_upload in my plugin. However, I believe your plugin has a hook on that function. It gets a WC session:
$wc_session = WC()->session;
Then it throws a fatal error when trying to use that null object.
Can you change it somehow so that it does not affect other plugins using
wp_handle_upload
, or provide advice on how we can be compatible with your plugin? Thank you!Example stack trace:
#6 /plugins/easy-upload-files-during-checkout/inc/functions.php on line 1556 #5 /plugins/peachpay-for-woocommerce/peachpay.php(441): peachpay_process_upload(Array, 0) #4 /plugins/peachpay-for-woocommerce/peachpay.php(488): wp_handle_upload(Array, Array) #3 /includes/file.php(987): _wp_handle_upload(Array, Array, NULL, 'wp_handle_uploa...') #2 /wp-admin/includes/file.php(754): apply_filters('wp_handle_uploa...', Array) #1 /wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array) #0 /wp-includes/class-wp-hook.php(287): eufdc_check_file_type_before_upload(Array) Stack trace: [05-Feb-2021 01:12:33 UTC] PHP Fatal error: Uncaught Error: Call to a member function set() on null in /plugins/easy-upload-files-during-checkout/inc/functions.php:1556
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Hook on wp_handle_upload throws fatal error’ is closed to new replies.