cart->cart_contents_count; $result = array( 'count' => $count ); wp_send_json_success( $result ); }