Improve "Save Order" button to reproduce WordPress post/page behavior

Display "Create" when order is in "auto-draft" status and then display only "Update" after.

Closes #14818
This commit is contained in:
Claudio Sanches 2017-05-03 15:06:06 -03:00
parent 7edf10e9e1
commit 67258ec8da
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ class WC_Meta_Box_Order_Actions {
}
?></div>
<input type="submit" class="button save_order button-primary tips" name="save" value="<?php printf( __( 'Save %s', 'woocommerce' ), strtolower( $order_type_object->labels->singular_name ) ); ?>" data-tip="<?php printf( __( 'Save/update the %s', 'woocommerce' ), strtolower( $order_type_object->labels->singular_name ) ); ?>" />
<input type="submit" class="button save_order button-primary" name="save" value="<?php echo 'auto-draft' === $post->post_status ? esc_attr__( 'Create', 'woocommerce' ) : esc_attr__( 'Update', 'woocommerce' ); ?>" />
</li>
<?php do_action( 'woocommerce_order_actions_end', $post->ID ); ?>