Show "Save draft" instead of "Saved" on initial product page (#38609)

This commit is contained in:
Joshua T Flowers 2023-06-08 15:32:49 -07:00 committed by GitHub
parent 8098c35588
commit e09e8b8ab0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: fix
Show "Save draft" instead of "Saved" on initial product page

View File

@ -103,7 +103,7 @@ export function useSaveDraft( {
let children: ReactNode;
if ( productStatus === 'publish' ) {
children = __( 'Switch to draft', 'woocommerce' );
} else if ( hasEdits ) {
} else if ( hasEdits || productStatus === 'auto-draft' ) {
children = __( 'Save draft', 'woocommerce' );
} else {
children = (