Problems in woo.php after latest xstore update

This topic has 13 replies, 4 voices, and was last updated 1 hour, 13 minutes ago ago by Tony Rodriguez

  • Avatar: ziga32
    ziga32
    Participant
    May 20, 2026 at 10:06

    I updated xstore to the latest version. My site was working ok, but ma DE (only de) version was crashed.
    https://cleanshot.com/share/5jnNTzzp

    Error:
    Uncaught ArgumentCountError: 3 arguments are required, 2 given
    in wp-content/themes/xstore/framework/woo.php:3172

    Root cause:
    In etheme_sale_label_percentage_text() (around line 3068–3172 in woo.php), the sale label is built using:

    sprintf( str_replace(‘{sales_text}’, $element_options[‘sale_label_text’], __( ‘{sales_text} %s’, ‘xstore’ )), $percentage )

    The issue is that __( ‘{sales_text} %s’, ‘xstore’ ) returns the translated string from the DE language file, which apparently contains two placeholders (e.g. %s %s or %1$s %2$s) instead of the original {sales_text} %s. This causes sprintf() to expect 3 arguments but only receive 2, resulting in a fatal error.

    Workaround applied:
    Replaced the sprintf() call entirely with a direct str_replace + string concatenation:

    $element_options[‘sale_label_text’] = str_replace( ‘{sales_text}’, $element_options[‘sale_label_text’], ‘{sales_text} ‘ . round( ( ( $element_options[‘regular_price’] – $element_options[‘sale_price’] ) / $element_options[‘regular_price’] ) * 100 ) . ‘%’ );

    how do I avoid this in the future updates?

    12 Answers
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    May 21, 2026 at 07:55

    Hello, ziga32,

    Please provide us with the FTP and admin panel access details for the website experiencing the issue.

    Best regards,
    8Theme Team

    Avatar: ziga32
    ziga32
    Participant
    May 21, 2026 at 09:43

    thanks

    Content is visible for topic creator and
    support staff only.
    Avatar: Ayan Rahman
    Ayan Rahman
    Support staff
    May 21, 2026 at 16:17

    Hi,

    We can’t connect FTP:

    Error:         	Connection timed out after 20 seconds of inactivity
    Error:         	Could not connect to server

    Please check it. Try to connect to FTP using FileZilla by yourself and provide us with the correct credentials.
    Is there a restriction by IP or something else that doesn’t allow us to connect?

    Warm Regards,
    The 8Theme Team

    Avatar: ziga32
    ziga32
    Participant
    May 21, 2026 at 16:43

    works ok, please share yuur ip

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    May 22, 2026 at 08:49

    Hello, ziga32,

    We have provided the IP address in the private content.

    Best regards,
    The 8Theme Team

    Content is visible for topic creator and
    support staff only.
    Avatar: ziga32
    ziga32
    Participant
    May 22, 2026 at 10:47

    done, whitelisted

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    May 22, 2026 at 15:37

    Hello, ziga32,

    Thank you for providing access. To prevent this issue from recurring, we have added the following function to the functions.php file of your child theme: etheme_sale_label_percentage_text
    After the update, this problem should no longer appear.

    Best regards,
    8Theme Team

    Avatar: ziga32
    ziga32
    Participant
    May 22, 2026 at 15:39

    I already fixed the problem, I just want it to be safe to update in the future?

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    May 22, 2026 at 16:35

    To prevent this issue from recurring, please do not remove the following function from your child theme:

    etheme_sale_label_percentage_text

    Best regards,
    8Theme Team

    Avatar: ziga32
    ziga32
    Participant
    May 22, 2026 at 18:41

    thank you

    Avatar: ziga32
    ziga32
    Participant
    May 22, 2026 at 18:42

    Thanks for the support! My topic “problems in woo.php after latest xstore update” has been successfully resolved.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    May 22, 2026 at 18:42

    Dear ziga32,

    Thanks for being part of our WordPress & WooCommerce community!

    We’re happy we could assist you. Your feedback truly matters — it helps us make XStore better, faster, and more reliable with every release.

    Together, we’re shaping a better WooCommerce experience for everyone.

    Topic closed.
    The 8Theme Team

  • Viewing 13 results - 1 through 13 (of 13 total)

The issue related to '‘problems in woo.php after latest xstore update’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.