From a141c79d104de9b78475c6dc7824b1f6c3d2c0b0 Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Wed, 26 Nov 2014 13:29:14 -0800 Subject: [PATCH] Change insert button label for custom order types --- includes/admin/class-wc-admin-post-types.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index 0d3191afbbc..2eff9acecf9 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -1942,7 +1942,7 @@ class WC_Admin_Post_Types { public function change_insert_into_post( $strings ) { global $post_type; - if ( in_array( $post_type, array( 'product', 'shop_order', 'shop_coupon' ) ) ) { + if ( in_array( $post_type, array( 'product', 'shop_coupon' ) ) || in_array( $post_type, wc_get_order_types() ) ) { $obj = get_post_type_object( $post_type ); $strings['insertIntoPost'] = sprintf( __( 'Insert into %s', 'woocommerce' ), $obj->labels->singular_name );