Cart initializing for superadmin querying many rows
-
In woocommerce/includes/class-woocommerce.php this function is running without check if the user is a superadmin, which can break wpms big installations:
if ( is_null( $this->customer ) || ! $this->customer instanceof WC_Customer ) { $this->customer = new WC_Customer( get_current_user_id(), true ); //Customer should be saved during shutdown. add_action( 'shutdown', array( $this->customer, 'save' ), 10 ); }Could you guys, please, implement this verification in the next versions? Tks! 😉
if ( is_null( $this->customer ) || ! $this->customer instanceof WC_Customer ) { if (!is_super_admin() ) { $this->customer = new WC_Customer( get_current_user_id(), true ); //Customer should be saved during shutdown. add_action( 'shutdown', array( $this->customer, 'save' ), 10 ); } }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Cart initializing for superadmin querying many rows’ is closed to new replies.