Change insert button label for custom order types

This commit is contained in:
Brent Shepherd 2014-11-26 13:29:14 -08:00 committed by thenbrent
parent 3fd9bc9027
commit a141c79d10
1 changed files with 1 additions and 1 deletions

View File

@ -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 );