Home Forums WoodMart support forum Uncaught ArgumentCountError: 3 arguments are required, 2 given:template-tags.php

Uncaught ArgumentCountError: 3 arguments are required, 2 given:template-tags.php

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #585960

    rp
    Participant

    Hi,

    Please fix this issue because it goes with us from a version to a version. Thanks.

    PHP message: PHP Fatal error:  Uncaught ArgumentCountError: 3 arguments are required, 2 given in /var/www/html/wordpress/wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php:1519
    
    Stack trace:
    #0 /var/www/html/wordpress/wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php(1519): sprintf()
    #1 /var/www/html/wordpress/wp-includes/class-wp-hook.php(326): woodmart_product_label()
    #2 /var/www/html/wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #3 /var/www/html/wordpress/wp-content/themes/woodmart/woocommerce/loop/sale-flash.php(16): apply_filters()
    #4 /var/www/html/wordpress/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/var/www/html/w...')
    #5 /var/www/html/wordpress/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1439): wc_get_template()
    #6 /var/www/html/wordpress/wp-includes/class-wp-hook.php(324): woocommerce_show_product_loop_sale_flash()
    #7 /var/www/html/wordpress/wp-includes/class-wp-hook.php" while reading response header from upstream, client: 

    template: woodmart 7.2, 7.5 (game)
    php versions: 7.4, 8.2

    It works with two arguments passed in _x() like this:
    sprintf( _x( '-%d%%', 'sale percentage' ), $percentage )

    Now it is:
    sprintf( _x( '-%d%%', 'sale percentage', 'woodmart' ), $percentage )

    I didn’t find using _x() function with 3 args.

    • This topic was modified 1 month, 1 week ago by rp.
    #585983

    Luke Nielsen
    Keymaster

    Hello,

    Is there any chance that you could give me access to the dashboard area so I can have a look at the settings on your website, please?

    Also, send me some screenshots of where the error is shown.

    Kind Regards

    #586425

    rp
    Participant

    Hi,

    Sorry I can’t provide you access to our site.

    You can check it by installing: wordpress + php8.2 + temos (game) 7.5.2 and go to any page of the website where you show badge with discount price.

    #586429

    rp
    Participant

    wordpress version is 6.6.1

    #586820

    Luke Nielsen
    Keymaster

    Hello,

    I will await the access to the stage site and then we can investigate it.

    Thank you for your time and patience.

    Kind Regards

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