• Resolved Shravan

    (@shravanbhavyata)


    I’m currently using Shiprocket plugin to calculate the shipping charges for the products on my shop page based on woocommerce. And every time I add a product to the cart these set of warnings pop-up

    “`Warning: A non-numeric value encountered in /home/customer/www/new.bhavyata.com/public_html/wp-content/plugins/shiprocket/includes/class-shiprocket-woocommerce-shipping-method.php on line 161

    Warning: Cannot modify header information – headers already sent by (output started at /home/customer/www/new.bhavyata.com/public_html/wp-content/plugins/shiprocket/includes/class-shiprocket-woocommerce-shipping-method.php:1) in /home/customer/www/new.bhavyata.com/public_html/wp-content/plugins/sg-cachepress/core/Supercacher/Supercacher_Helper.php on line 79`”

    I’m currently using Shiprocket Version 1.0.5 and Woocommerce Version 5.3.0

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Ben Meredith

    (@benmeredithgmailcom)

    Hi there,

    This seems like a question better suited for either the shiprocket team or th woocommerce team, not us here on the GiveWP team.

    At first glance though, what you are seeing here is a _warning_ not an explicit _error_ and is caused by having WP_DEBUG (a developer tool to be able to catch issues by displaying them on the site) enabled on the site. I’d recommend disabling the display of those on production sites, to prevent these types of issues.

    TO do that, you can add the following lines to your site’s wp-config.php file (your web host should be able to help you access and edit that file)

    // Turn debugging on
    define('WP_DEBUG', true);
    
    // Tell WordPress to log everything to /wp-content/debug.log
    define('WP_DEBUG_LOG', true);
    
    // Turn off the display of error messages on your site
    define('WP_DEBUG_DISPLAY', false);
    
    // Hide general PHP errors 
    @ini_set('display_errors', 0);

    Then, reach out to the team at those two plugins, because I’m sure they’d love to track down exactly what’s causing that warning to display!

    Have a great day!

    Thread Starter Shravan

    (@shravanbhavyata)

    Thank you! for your help. I did raise a query to shiprocket.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘A non-numeric value encountered in’ is closed to new replies.