728x90

When updating to WooCommerce 2.1.1. I get this notice:

Notice: Woocommerce->add_inline_js is deprecated since version 2.1! Use wc_enqueue_js instead. in /nas/wp/www/staging/webwinkels001/wp-includes/functions.php on line 2908

For some reason, this is also conflicting with my contact page you can find here:

http://webwinkels001.staging.wpengine.com/contact/

When you press 'Verzenden' normally it should show only errors you have to fill in the fields, but now I get this:

Notice: Woocommerce->add_inline_js is niet meer in gebruik sinds versie2.1! Gebruik in plaats daarvan wc_enqueue_js. in /nas/wp/www/staging/webwinkels001/wp-includes/functions.php on line 2908
{"90":"Dit veld mag niet leeg blijven.","92":"Dit veld mag niet leeg blijven.","95":"Dit veld mag niet leeg blijven."}

When I'm LOGGED OUT I also see this on WooCommerce pages:

Notice: Woocommerce->setup_product_data is niet meer in gebruik sinds versie2.1! Gebruik in plaats daarvan wc_setup_product_data. in /nas/wp/www/staging/webwinkels001/wp-includes/functions.php on line 2908
@coenjacobs
Contributor

coenjacobs commented on 13 Feb 2014

I think the error shows pretty clear what the issue is. You (or your theme) shouldn't use the add_inline_jsmethod anymore, but use the wc_enqueue_js function instead.

This is not a support channel though, as this is not a corre issue. You can post this kind of questions in our public support forum: http://wordpress.org/support/plugin/woocommerce or in case you are a WooThemes customer via our support portal: http://support.woothemes.com

@coenjacobs coenjacobs closed this on 13 Feb 2014

@Willem-Siebe

Hi Coen,

I thought this is a WooCommerce issue, so I posted it here.
I don't know how you see it's caused by my theme, I think I still have to learn a lot.
But know I know it's my theme since you said it is, I will contact them.

Thanks.

@coenjacobs
Contributor

coenjacobs commented on 13 Feb 2014

I'm not sure it's your theme, it can also be a plugin. But it's not WooCommerce core, since we've taken all usage of that function out of it, which is why I recommend you use a support channel.

Please note that this is a notice only. If you disable debug mode on your site, the notices (and possible warnings too) will be suppressed and will not be shown. This doesn't mean you shouldn't fix it, or ask for a fixed version of your theme, as this will start to cause issues in future versions.


+ Recent posts