• Resolved ucsendre

    (@ucsendre)


    Hi @wpclever

    In my WP debug log this line appears a few times because of your plugin:
    PHP Deprecated: Non-static method WC_Email::get_blogname() should not be called statically in /var/www/vhosts/domain.tld/httpdocs/wp-content/plugins/woo-product-bundle-premium/includes/class-woosb.php on line 2897

    Line 2897 contains:
    $subject = sprintf( '[%s] %s', WC_Email::get_blogname(), esc_html__( 'Bundle(s) low in stock', 'woo-product-bundle' ) );

    You should change this line like below:
    $subject = sprintf( '[%s] %s', (new WC_Email())->get_blogname(), esc_html__( 'Bundle(s) low in stock', 'woo-product-bundle' ) );

    or based on how you did just a few lines above (line 2871):
    $subject = sprintf( '[%s] %s', wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ), esc_html__( 'Bundle(s) low in stock', 'woo-product-bundle' ) );

    Best regards,
    Endre

Viewing 1 replies (of 1 total)
  • Plugin Author WPClever

    (@wpclever)

    Hi @ucsendre

    Thanks for your informing us on this issue!
    I’ll fix it and release an updated version soon.

    Yes! We should change WC_Email::get_blogname() to wp_specialchars_decode( get_option( ‘blogname’ ), ENT_QUOTES ).

Viewing 1 replies (of 1 total)
  • The topic ‘Non-static method WC_Email::get_blogname() should not be called statically’ is closed to new replies.