Merge branch 'fix/20658' of https://github.com/woocommerce/woocommerce into fix/20658

This commit is contained in:
Mike Jolley 2019-01-09 16:11:14 +00:00
commit 679af01f8d
1 changed files with 5 additions and 1 deletions

View File

@ -524,7 +524,11 @@ jQuery( function( $ ) {
* After saved, continue with form submission
*/
save_on_submit_done: function() {
$( 'form#post' ).append('<input type="hidden" name="publish" value="1" />').submit();
if ( $( '#hidden_post_status' ).val() !== 'publish' ) {
$( 'form#post' ).append('<input type="hidden" name="save-post" value="1" />').submit();
} else {
$( 'form#post' ).append('<input type="hidden" name="publish" value="1" />').submit();
}
},
/**