Showing order statuses in a dropdown menu
-
I wish to show the order statuses in another plugin in a drop down menu. The following code was used until Woo 2.1 and I am looking for compatible code for Woo 2.2+. Any help will be greatly appreciated.
<?php foreach ( $statuses as $status ): ?> <option value="<?php print esc_attr( $status->slug ) ?>" <?php print ($switch && $switch->status_from == $status->slug) ? 'selected' : '';//print selected( $status->slug, $order->status, false ) ?>> <?php print esc_html__( $status->name, 'woocommerce' ) ?> </option> <?php endforeach; ?>
Thanks
- The topic ‘Showing order statuses in a dropdown menu’ is closed to new replies.