Viewing 1 replies (of 1 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! Our plugin uses the internal WooCommerce method for retrieving the shipping address:

    
    $shipping_address = $order->get_formatted_shipping_address();
    

    If it shown ‘N/A’ in your PDF, it means that the Ship to Multiple Addresses plugin does not return a default address when this function is called. I would recommend contacting their plugin support and ask them if there’s a setting for this that would return one or more addresses when that get_formatted_shipping_address method is used.

    We also have a filter to override the address, wpo_wcpdf_shipping_address, here’s an example:

    
    add_filter( 'wpo_wcpdf_shipping_address', 'wpo_wcpdf_shipping_address_override', 10, 2 );
    function wpo_wcpdf_shipping_address_override( $address, $document ) {
    	if ( $address == __('N/A', 'woocommerce-pdf-invoices-packing-slips' ) ) {
    		// check alternate resources when no address found
    		// order can be accessed in $document->order
    	}
    	return $address;
    }
    

    Hope that helps!

Viewing 1 replies (of 1 total)
  • The topic ‘WooCommerce Ship to Multiple Addresses Not Showing up on packing slip’ is closed to new replies.