Load dependencies in wc_load_cart

This commit is contained in:
Mike Jolley 2020-04-20 12:30:44 +01:00
parent 968f7ddc5b
commit 232ae16940
1 changed files with 7 additions and 0 deletions

View File

@ -2285,8 +2285,15 @@ function wc_load_cart() {
return;
}
// Ensure dependencies are loaded in all contexts.
include_once WC_ABSPATH . 'includes/wc-cart-functions.php';
include_once WC_ABSPATH . 'includes/wc-notice-functions.php';
WC()->initialize_session();
WC()->initialize_cart();
// Make sure cart is loaded from session.
WC()->cart->get_cart();
}
/**