Home Forums WoodMart support forum Estimate Delivery Date Fatal Error WPML

Estimate Delivery Date Fatal Error WPML

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #660741

    carlos_c98
    Participant

    Hi,

    After installing WPML on my website, I started encountering a fatal PHP error when viewing product pages. The issue seems to be related to the Estimated Delivery module in the theme.

    Here’s the error I’m getting in the log:

    PHP Fatal error: Uncaught TypeError: uasort(): Argument #1 ($array) must be of type array, string given in 
    /wp-content/themes/woodmart/inc/integrations/woocommerce/modules/estimate-delivery/class-manager.php on line 255

    From the stack trace, it seems that the uasort() function is being called with a string instead of an array — possibly due to WPML altering the delivery rules data structure.

    I suspect that WPML is treating the delivery rules (possibly stored in custom fields like _xts_estimate_rules or _woodmart_estimate_delivery) as translatable strings, which causes the array to be returned as a serialized or string format, breaking the module.

    What I’ve tried:
    Confirmed that disabling the Estimated Delivery module prevents the error.

    Set the suspected custom fields to “Do not translate” in WPML settings.

    Cleared all caches and re-saved the product.

    However, the issue persists on some product translations.

    Could you please confirm:

    The correct custom field names used by the Estimated Delivery module, so I can safely exclude them from WPML translation?

    Whether the module is compatible with WPML?

    If there’s a code-level fix or recommended workaround?

    Thanks in advance for your support!

    Best regards,

    #660753

    carlos_c98
    Participant

    I have temporarily disabled ‘estimate date’ and everything works correctly again.

    I tried deleting the string translations in phpMyAdmin but that didn’t solve the problem either:

    TRUNCATE TABLE wp_icl_strings;
    TRUNCATE TABLE wp_icl_string_translations;
    TRUNCATE TABLE wp_icl_string_positions;
    TRUNCATE TABLE wp_icl_string_packages;
    TRUNCATE TABLE wp_icl_string_batches;
    TRUNCATE TABLE wp_icl_string_status;
    #660783

    Luke Nielsen
    Keymaster

    Hello,

    Is there any chance that you could give me access to the dashboard area so I can check the settings there?

    Looking forward to collaborating with you!

    Kind Regards

    #660842

    carlos_c98
    Participant

    Ok

    #660909

    Luke Nielsen
    Keymaster

    Hello,

    Please send FTP access because editing files via the admin panel is blocked.

    Thank you in advance.

    Kind Regards

    #660913

    carlos_c98
    Participant

    Now you should be able to modify them

    #660944

    Luke Nielsen
    Keymaster

    Hello,

    Please check this https://monosnap.com/file/gv8zGrWQLuFmHtpNWleZIlTLwtX3cL screenshot.

    It seems that we are unable to edit it.

    Kind Regards

    #660988

    carlos_c98
    Participant

    Ok I send ftp log in details

    #661082

    Luke Nielsen
    Keymaster

    Hello,

    It seems that FTP access is not working – https://prnt.sc/CZucp5-NtQo5 , could you please update it?

    Thank you in advance.

    Kind Regards

    #661120

    carlos_c98
    Participant

    Ok, I just tried and is working now with the ip of the server.

    #661142

    Luke Nielsen
    Keymaster

    Hello,

    We checked your site and found that it has more than 100 rules, of which only 12 are set up correctly. The rest were copied by a foreign functionality with errors – without the necessary metadata.

    In this case, we recommend deleting or correctly adjusting all incorrectly copied rules. After that, the error on the site will disappear.

    We draw your attention to the future that we also have a functionality of duplication of rules which works correctly and does not make additional errors. https://monosnap.com/file/4Wbrd0cbXDKumshdyuCfDgt00BX6bc

    Kind Regards

    #661396

    carlos_c98
    Participant

    Ok, now is working. The problem was that I enabled the estimate delivery entry type translation in WPML and created those entries in the estimate delivery section that are wrong.

    #661547

    Luke Nielsen
    Keymaster

    Hello,

    Thank you for the update. Glad to hear that the issue has been resolved after adjusting the translation settings in WPML. If you have any further questions or need additional assistance, feel free to reach out.

    Best regards

Viewing 13 posts - 1 through 13 (of 13 total)

The topic ‘Estimate Delivery Date Fatal Error WPML’ is closed to new replies.