I am creating an extension plugin for WooCommerce and am getting the error Uncaught Error: Call to a member function get() on null
The code that is causing this is:
foreach ( $this->cart_session_data as $key => $default ) {
$this->$key = WC()->session->get( $key, $default );
}
The full code can be seen here http://pastebin.com/v9e2QrLv
Thanks in advance for your help