Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Fatal error on WC session

$
0
0

Replies: 1

Fatal error: Uncaught Error: Call to a member function get() on null in woo-order-splitter/inc/functions.php:14630

in wc_os_front_scripts WC()->session is being used to localize some variables. and this causing fatal error with 3rd party plugin like SG optimizer.

SG optimizer uses do_action( ‘wp_enqueue_scripts’ ) somewhere so all the frontend scripts hooked there too. but as it’s a rest API call. the WC()->session returns null.

It will be great if there will be a null check before using WC()->session method so that 3rd party plugins won’t get issues.

Thanks


Viewing all articles
Browse latest Browse all 59525

Trending Articles