Solution for : WooCommerce- change admin date format
I would like to change the WooCommerce date format from Y/m/d to d/m/Y. I have the Print invoice plug-in, and the dates are in the y/m/d format as taken from the date ordered in WooCommerce.
You also have to change the value of '$t_time' variable using the same 'post_date_column_time' filter.You have to return two values ($t_time and $h_time) using two separate callback functions. Your code will work when you add following callback on same filter in addition to your code.
add_filter( 'post_date_column_time' ,'woo_custom_post_date_column_time_withDate' ); function woo_custom_post_date_column_time_withDate( $post ) { $t_time = get_the_time( __( 'd/m/Y g:i:s A', 'woocommerce' ), $post ); return $t_time; }
Also check the format you have set into the call back function, change it to 'd/m/Y' since you require it.
No comments:
Post a Comment