• Resolved Robert

    (@flobbit)


    The attendee form that is provided by the Event Tickets Plus plugin, is no longer appearing correctly since WooCommerce 6.3.0.

    The Event Tickets plus plugin does an ajax call to retrieve cart data.

    See screenshot here:
    https://snipboard.io/w62ard.jpg

    Here is a code snippet from the Event Tickets Plus plugin.

    	/**
    	 * Get all tickets currently in the cart for Commerce.
    	 *
    	 * @since 4.11.0
    	 *
    	 * @param array $tickets List of tickets.
    	 *
    	 * @return array List of tickets.
    	 */
    	public function commerce_get_tickets_in_cart( $tickets = [] ) {
    		try {
    			$wc = WC();
    
    			// If the cart is null, we need to bail to prevent any "Call to a member function on null" errors
    			if ( is_null( $wc->cart ) ) {
    				wc_load_cart();
    
    				// API requests need extra things available for the cart.
    				if ( $wc->is_rest_api_request() ) {
    					$wc->frontend_includes();
    
    					$cart_session = new WC_Cart_Session( $wc->cart );
    					$cart_session->maybe_set_cart_cookies();
    				}
    			}
    
    			$contents = $wc->cart->get_cart_contents();

    When debugging this, the contents of the cart is always returning as empty, even though I have items in my cart.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Incompatibility with WooCommerce 6.3.1 and Modern tribe Event Tickets plus plugi’ is closed to new replies.