Appointments with MarketPress - shipping forced in checkout

When an integration with MarketPress is enabled in A+ and it creates a product page, it sets it as a "Physical/Tangible" product. Changing the product type to "Download" or "External/Affiliate" requires you to add a price to the product and some URL/file while it shouldn't, so it's not an option.

The main point is that even if you disable Shipping in Store Settings -> Shipping, customer is asked for shipping/billing addresses which is unnecessary in case of Appointments.

  • Panos

    Hey there Tom ,

    If you are using MarketPress only for appointments you could modify file
    and at line 1498 change it from
    $this->_is_download_only = false;
    $this->_is_download_only = true;

    In case you are selling other products you can change that line to:
    $this->_is_download_only = apply_filters( 'mp_cart/is_product_downloadable', false, $product );
    so we can then filter out appointments in cart and checkout page.

    Only in case you are selling other product too, you can add the following snippet on your child theme's functions.php ( or a mu-plugin ):

    add_filter( 'mp_cart/is_product_downloadable', function( $is_download, $product ){
    	if( is_object( $product ) ){
    		$post = $product;
    		if( $product->post_type == "mp_product_variation" ){
    			$post = get_post( $post->post_parent );
    		if ( strpos( $post->post_content, '[app_' ) !== false ) {
    			$is_download = true;
    	return $is_download;
    }, 10, 2 );

    Hope this helps!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.