Change insert button label for custom order types
This commit is contained in:
parent
3fd9bc9027
commit
a141c79d10
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue