• Resolved plose2009bx

    (@plose2009bx)


    Hi, I found solutions in the forum for hiding the shipping address when the customer choses Local Pickup in the shipping methods:

    /**
     * WooCommerce PDF Invoices & Packing Slips:
     * Hide 'Ship To' heading if the shipping method is 'Local pickup'
     */
    add_action( 'wpo_wcpdf_custom_styles', function( $document_type, $document ) {
    	if ( $document_type == 'invoice' && ( $shipping_methods = $document->order->get_shipping_methods() ) ) {
    		// Check shipping methods
    		if ( $shipping_methods ) {
    			$first_method = array_shift( $shipping_methods );
    			$shipping_method_id = $first_method->get_method_id();
    		}		
    		if ( $shipping_method_id == 'local_pickup' ) {
    		?>
    		.shipping-address h3 {
    			display: none;
    		}
    		<?php
    		}
    	}
    }, 10, 2 );

    , but how can I do the same if the chosen shipping method is a Service Point?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Hide shipping address for Service Point’ is closed to new replies.