Dokan New Order Status Problem
-
Hello,
I am adding new order status using source here (weDevs) However, although it should only appear in the “span” tag, it also appears in “td” tag.
Please look at the image: Image Link
What’s the problem ? Can you help me ?My Code:
function rregister_new_order_status_for_vendor() { register_post_status( 'wc-vendor-approve', array( 'label' => _x( 'Getting ready', 'Order status', 'woocommerce' ), 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop( 'Getting ready (%s)', 'Getting ready(%s)', 'woocommerce' ) ) ); } add_action( 'init', 'rregister_new_order_status_for_vendor' ); /** * Add new custom status for WC order statuses * * @param array $order_statuses * * @return array $order_statuses */ function rregister_to_wc_new_order_status_for_vendor( $order_statuses ) { $order_statuses[ 'wc-vendor-approve' ] = _x( 'Getting ready', 'Order status', 'woocommerce' ); return $order_statuses; } add_filter( 'wc_order_statuses', 'rregister_to_wc_new_order_status_for_vendor', 12, 1 ); /** * Add new custom status button class on order status * * @param string $text * @param string $status * * @return string $text */ function dokan_get_order_status_class_t( $text, $status ) { switch ( $status ) { case 'wc-vendor-approve': case 'vendor-approve': $text = 'success'; } return $text; } add_filter( 'dokan_get_order_status_class', 'dokan_get_order_status_class_t', 10, 2 ); /** * Custom order status translated * * @param string $text * @param string $status * * @return string $text */ function dokan_add_custom_order_status_translated_t( $text, $status ) { switch ( $status ) { case 'wc-vendor-approve': case 'vendor-approve': $text = __( 'Getting ready', 'dokan-lite' ); break; } return $text; } add_filter( 'dokan_get_order_status_translated', 'dokan_add_custom_order_status_translated_t', 10, 2 );
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Dokan New Order Status Problem’ is closed to new replies.