Non-static method WC_Email::get_blogname() should not be called statically
-
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 2897Line 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
- The topic ‘Non-static method WC_Email::get_blogname() should not be called statically’ is closed to new replies.