• Resolved Adam

    (@dannythedog)


    I have a recurring Warning:

    PHP Warning: A non-numeric value encountered in /wp-content/plugins/litespeed-cache/thirdparty/woocommerce.cls.php on line 453

    How to get rid of it?

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support qtwrk

    (@qtwrk)

    please try

    edit that file , line 448

    find 2 lines

    		$sale_from = get_post_meta( $id, '_sale_price_dates_from', true ) ;
    		$sale_to = get_post_meta( $id, '_sale_price_dates_to', true ) ;

    replace them to

    
    $sale_from = (int) get_post_meta( $id, '_sale_price_dates_from', true ) ;
    $sale_to = (int) get_post_meta( $id, '_sale_price_dates_to', true ) ;

    then see how it goes

    Thread Starter Adam

    (@dannythedog)

    I tried on staging and the warning dissapeard. Now I have a big sale on production. Is it safe to try it there?

    /edit

    I can see it generates a warnings in another plugin:

    PHP Warning: Undefined array key “mapfrom” in /wp-content/plugins/woo-product-feed-pro/classes/class-get-products.php on line 4664

    PHP Warning: Undefined array key “mapfrom” in /wp-content/plugins/woo-product-feed-pro/classes/class-get-products.php on line 4807

    • This reply was modified 1 year, 11 months ago by Adam.
    • This reply was modified 1 year, 11 months ago by Adam.
    • This reply was modified 1 year, 11 months ago by Adam.
    Plugin Support qtwrk

    (@qtwrk)

    yes, this code just turn a number string to integer , should be safe to use as long as that string comes with number , which it is supposed to be a number

    for other plugin , I’d suggest to check up with their team

    Thread Starter Adam

    (@dannythedog)

    @qtwrk thx for your help.

    Will this change be included in the next version of LSC? Is this an official patch?

    Plugin Support qtwrk

    (@qtwrk)

    yes , it will be added

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Warning woocommerce.cls.php on line 453’ is closed to new replies.