• Resolved Lyk

    (@lyk-1)


    Hello!

    I have noticed that under the Status -> Scheduled Action, the woocommerce_run_product_attribute_lookup_regeneration_callback keeps failing on PHP 8.0.18.

    Changing to 7.4.29 allows the callback to run and the table seems to be generated just fine.

    We are using WooCommerce version 6.3.1.

    Is this something that should be worked on?

    The error seems to be a PHP Fatal error Uncaught TypeError: array_flip().
    The whole error stack:

    PHP Fatal error Uncaught TypeError: array_flip(): Argument #1 ($array) must be of type array, WP_Error given in /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/src/Internal/ProductAttributesLookup/LookupDataStore.php:507
    
    Stack trace: 
    #0 /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/src/Internal/ProductAttributesLookup/LookupDataStore.php(507): array_flip() 
    
    #1 /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/src/Internal/ProductAttributesLookup/LookupDataStore.php(426): Automattic\WooCommerce\Internal\ProductAttributesLookup\LookupDataStore->get_term_ids_by_slug_cache() 
    
    #2 /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/src/Internal/ProductAttributesLookup/LookupDataStore.php(351): Automattic\WooCommerce\Internal\ProductAttributesLookup\LookupDataStore->create_data_for_variable_product() 
    
    #3 /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/src/Internal/ProductAttributesLookup/LookupDataStore.php(339): Automattic\WooCommerce\Internal\ProductAttributesLookup\LookupDataStore->create_data_for() 
    
    #4 /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/src/Internal/ProductAttributesLookup/DataRegenerator.php(231): Automattic\WooCommerce\Internal\ProductAttributesLookup\LookupDataStore->create_data_for_product() 
    
    #5 /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/src/Internal/ProductAttributesLookup/DataRegenerator.php(176): Automattic\WooCommerce\Internal\ProductAttributesLookup\DataRegenerator->do_regeneration_step() 
    
    #6 /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/src/Internal/ProductAttributesLookup/DataRegenerator.php(69): Automattic\WooCommerce\Internal\ProductAttributesLookup\DataRegenerator->run_regeneration_step_callback() 
    
    #7 /var/www/vhosts/p..../httpdocs/wp-includes/class-wp-hook.php(307): Automattic\WooCommerce\Internal\ProductAttributesLookup\DataRegenerator->Automattic\WooCommerce\Internal\ProductAttributesLookup\{closure}() 
    
    #8 /var/www/vhosts/p..../httpdocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() 
    
    #9 /var/www/vhosts/p..../httpdocs/wp-includes/plugin.php(522): WP_Hook->do_action() 
    
    #10 /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/actions/ActionScheduler_Action.php(22): do_action_ref_array() 
    
    #11 /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler_Abstract_QueueRunner.php(65): ActionScheduler_Action->execute() 
    
    #12 /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(162): ActionScheduler_Abstract_QueueRunner->process_action() 
    
    #13 /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_QueueRunner.php(132): ActionScheduler_QueueRunner->do_batch() 
    
    #14 /var/www/vhosts/p..../httpdocs/wp-includes/class-wp-hook.php(307): ActionScheduler_QueueRunner->run() 
    
    #15 /var/www/vhosts/p..../httpdocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() 
    
    #16 /var/www/vhosts/p..../httpdocs/wp-includes/plugin.php(474): WP_Hook->do_action() 
    
    #17 /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_AsyncRequest_QueueRunner.php(52): do_action() 
    
    #18 /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/includes/libraries/wp-async-request.php(147): ActionScheduler_AsyncRequest_QueueRunner->handle() 
    
    #19 /var/www/vhosts/p..../httpdocs/wp-includes/class-wp-hook.php(307): WP_Async_Request->maybe_handle() 
    
    #20 /var/www/vhosts/p..../httpdocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() 
    
    #21 /var/www/vhosts/p..../httpdocs/wp-includes/plugin.php(474): WP_Hook->do_action() 
    
    #22 /var/www/vhosts/p..../httpdocs/wp-admin/admin-ajax.php(187): do_action() 
    
    #23 {main} thrown σε /var/www/vhosts/p..../httpdocs/wp-content/plugins/woocommerce/src/Internal/ProductAttributesLookup/LookupDataStore.php lines 507
    

    Thank you!

    • This topic was modified 2 years, 6 months ago by Lyk.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @lyk-1,

    Thanks for reporting this issue.

    I have PHP 8.0.0 as the latest version installed on my testing environment so for now I’ll not be able to replicate what you describe. I’ve also searched on Github and didn’t find similar issues related to that PHP version.

    Can you update WooCommerce core to the current latest version 6.4.1?

    Also, make sure you’re on WordPress’ latest version and deactivate all plugins on your install. See if you manage to get the scheduled action to update on PHP 8.0.18.

    You can do this on a staging site. It’s worth checking if your host offers staging facilities or alternatively use the free WP Staging plugin.

    Let us know how it goes.

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    This thread has been inactive for a bit, so I’m going to mark it as resolved now. Hopefully, the above information was helpful to you.

    Please feel free to open a new thread if you have any further questions.

    Cheers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Failing woocommerce_run_product_attribute_lookup_regeneration_callback’ is closed to new replies.