Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sv_wc_add_my_account_orders_column( $columns ) {
- $new_columns = array();
- foreach ( $columns as $key => $name ) {
- $new_columns[ $key ] = $name;
- // add ship-to after order status column
- if ( 'order-number' === $key ) { //this is the line!
- $new_columns['custom-column'] = __( 'Titel', 'woocommerce' );
- }
- }
- return $new_columns;
- }
- add_filter( 'woocommerce_my_account_my_orders_columns', 'sv_wc_add_my_account_orders_column' );
- function wc_custom_column_display( $order ) {
- // do something here?>
- <p>Titel: <?php the_field('titel_bestellung-info', $order->get_id()); ?></p><?php
- }
- add_action( 'woocommerce_my_account_my_orders_column_custom-column', 'wc_custom_column_display' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement