File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
WooCommerce/Classes/ViewRelated/Products/Edit Product Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -65,12 +65,20 @@ final class ProductVariationFormViewModel: ProductFormViewModelProtocol {
6565
6666 /// The action buttons that should be rendered in the navigation bar.
6767 var actionButtons : [ ActionButtonType ] {
68- switch ( formType, hasUnsavedChanges ( ) ) {
69- case ( . edit, true ) :
70- return [ . save, . more]
71- default :
72- return [ . more]
68+ var buttons : [ ActionButtonType ] = {
69+ switch ( formType, hasUnsavedChanges ( ) ) {
70+ case ( . edit, true ) :
71+ return [ . save]
72+ default :
73+ return [ ]
74+ }
75+ } ( )
76+
77+ if shouldShowMoreOptionsMenu ( ) {
78+ buttons. append ( . more)
7379 }
80+
81+ return buttons
7482 }
7583
7684 /// Assign this closure to get notified when the variation is deleted.
You can’t perform that action at this time.
0 commit comments