Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

(WC 6.5 Beta) PHP 8 Fatal Error on Customize #6314

Closed
tammullen opened this issue Apr 25, 2022 · 1 comment · Fixed by #6317
Closed

(WC 6.5 Beta) PHP 8 Fatal Error on Customize #6314

tammullen opened this issue Apr 25, 2022 · 1 comment · Fixed by #6317
Labels
type: bug The issue/PR concerns a confirmed bug.

Comments

@tammullen
Copy link

Reporting on behalf of @gglobalstep

Describe the bug

On sites running on PHP 8 a Fatal Error occurs when loading the Customizer

To reproduce

Steps to reproduce the behavior:

  1. Go to wp-admin on a site using PHP 8 with only WooCommerce Active
  2. Click on Appearance > Customize
  3. See fatal error

Screenshots

PMS.mp4
 Fatal error: Uncaught Error: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "woocommerce_blocks_get_i18n_data_json" not found or invalid function name
in /srv/htdocs/__wp__/wp-includes/class-wp-hook.php on line 307

Call stack:

WP_Hook::apply_filters()
wp-includes/plugin.php:189
apply_filters()
wp-includes/l10n.php:1155
load_script_translations()
wp-includes/l10n.php:1122
load_script_textdomain()
wp-includes/class.wp-scripts.php:599
WP_Scripts::print_translations()
wp-includes/class.wp-scripts.php:314
WP_Scripts::do_item()
wp-includes/class.wp-dependencies.php:136
WP_Dependencies::do_items()
wp-includes/class.wp-scripts.php:660
WP_Scripts::do_head_items()
wp-includes/script-loader.php:1954
print_head_scripts()
wp-includes/class-wp-hook.php:307
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:331
WP_Hook::do_action()
wp-includes/plugin.php:474
do_action()
wp-includes/class-wp-customize-widgets.php:685
WP_Customize_Widgets::print_scripts()
wp-includes/class-wp-hook.php:307
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:331
WP_Hook::do_action()
wp-includes/plugin.php:474
do_action()
wp-admin/customize.php:174

Environment

WordPress (please complete the following information):

  • Core version: 5.9
  • WooCommerce version: 6.5.0 Beta 1
  • WooCommerce Blocks version: 7.4.1 (Bundled with WC)
  • Site language: English Default
  • Any other plugins installed: No
@tammullen tammullen added the type: bug The issue/PR concerns a confirmed bug. label Apr 25, 2022
@rodelgc
Copy link

rodelgc commented Apr 26, 2022

I'm able to reproduce this fatal error on JN and Atomic ephemeral sites using PHP 8. I can confirm that it's not happening on PHP 7.4.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants