Support

Account

Forum Replies Created

  • Hey Guys, old topic, but I have the same problem.I always get something like 20131111 and not what is expected…

    My PHP Version is 5.6.19

    That’s what I get when debugging:

    DateTime Object
    (
        [date] => 2016-05-27 21:47:17.000000
        [timezone_type] => 3
        [timezone] => UTC
    )

    I can’t go with cerulean’s solution because then the date output is all english what I get – instead of german, what I would need.

    Any ideas??

  • I finally found a solution to this.

    I needed to have a DHL number in my orders page – so when I shipped the order, I put in the DHL number in that field and it should show up in the order.

    That’s how I did it in my functions.php:

    add_action ('woocommerce_order_details_after_order_table', 'optigem_sendungsnummer', 20);
    		
    
    	function optigem_sendungsnummer( $order ) {
    	
    	if (get_field('sendungsnummer', $order->id)) { // Only show if field is filled
     
    ?>
    		<p class="sendungsnummer">DHL: <?php the_field('sendungsnummer', $order->id);    ?><p>  		
    		<?php 
    		
    	}
    
    }
Viewing 2 posts - 1 through 2 (of 2 total)