Additional fields not showing in order page for certain order status
-
So I use a few additional fields for my website’s checkout: some text input fields and a file upload field. My website accepts payments via bank transfer as well as an e-wallet using another plugin. Just yesterday I created a new order status for orders paid via e-wallet.
One of my customer’s complained that they couldn’t see the files they have uploaded. It seems that for the new order status I created none of the additional fields were visible on the order confirmation page as well as when we see the order from My Account page. The uploaded additional fields data were visible for default order statusses such as On Hold, Processing and Completed.
What would be the best way to go about this? If it’s any help, this was the code that I used to make the new order status:
//add payment received order status// // Register new status function register_payment_received_order_status() { register_post_status( 'wc-payment-received', array( 'label' => 'Payment received', 'public' => true, 'show_in_admin_status_list' => true, 'show_in_admin_all_list' => true, 'exclude_from_search' => false, 'label_count' => _n_noop( 'Payment received (%s)', 'Payment received (%s)' ) ) ); } // Add custom status to order status list function add_payment_received_to_order_statuses( $order_statuses ) { $new_order_statuses = array(); foreach ( $order_statuses as $key => $status ) { $new_order_statuses[ $key ] = $status; if ( 'wc-on-hold' === $key ) { $new_order_statuses['wc-payment-received'] = 'Payment received'; } } return $new_order_statuses; } add_action( 'init', 'register_payment_received_order_status' ); add_filter( 'wc_order_statuses', 'add_payment_received_to_order_statuses' );
- The topic ‘Additional fields not showing in order page for certain order status’ is closed to new replies.