Skip to content

Commit

Permalink
Store: Set a default price of 0 if no price is entered (Automattic#22063
Browse files Browse the repository at this point in the history
)
  • Loading branch information
justinshreve authored Feb 12, 2018
1 parent 65eb677 commit adc68ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/extensions/woocommerce/app/products/product-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ class ProductCreate extends React.Component {
// Product type was never switched, so set it before we save.
this.props.editProduct( site.ID, product, { type: 'simple' } );
}

if ( ! product.regular_price ) {
this.props.editProduct( site.ID, product, { regular_price: '0' } );
}

this.props.createProductActionList( successAction, failureAction );
};

Expand Down

0 comments on commit adc68ed

Please sign in to comment.