Navigation überspringen

Open

Reported for: WP All Import Multilingual 2.3.0

Topic Tags: Compatibility

Overview of the issue

When importing variable products with WP All Import and the WPML All Import add-on on a server running PHP 8, you will see the following error:

PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, class WCML_Synchronize_Product_Data does not have a method “delete_empty_post_meta_for_translations” in /wp-includes/class-wp-hook.php:309

In PHP 7.0, this error displays as a warning.

Workaround

Please make a full backup of your site before proceeding.

  1. Open the …/wp-content/plugins/wpml-all-import/classes/WCML.php file.
  2. Look for line 35 and comment it out:
    //remove_action( 'deleted_post_meta', [ $WCMLSynchronizeProductData, 'delete_empty_post_meta_for_translations' ], 10, 3 );
    
    
  3. Do the same with line 46:
    //add_action( 'deleted_post_meta', [ $this->getWCMLSynchronizeProductData(), 'delete_empty_post_meta_for_translations' ], 10, 3 );
    

4 Antworten zu “WPML All Import and PHP 8 - Fatal error: Uncaught TypeError: call_user_func_array when importing products”

Eine Antwort hinterlassen

Bitte bleiben Sie beim Thema und verhalten Sie sich anderen gegenüber respektvoll. Wenn Sie Hilfe bei Problemen benötigen, die nicht mit diesem Beitrag zusammenhängen, nutzen Sie unser Support-Forum, um einen Chat zu starten oder ein Ticket einzureichen.

Sie können diese Tags verwenden:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>