[API] Fixed variations backorders
This commit is contained in:
parent
fb62b9d511
commit
3fc2c82aaf
|
@ -1352,7 +1352,7 @@ class WC_API_Products extends WC_API_Resource {
|
|||
$backorders = get_post_meta( $variation_id, '_backorders', true );
|
||||
|
||||
if ( isset( $variation['backorders'] ) ) {
|
||||
if ( 'notify' == $variation['backorders'] ) {
|
||||
if ( 'notify' === $variation['backorders'] ) {
|
||||
$backorders = 'notify';
|
||||
} else {
|
||||
$backorders = ( true === $variation['backorders'] ) ? 'yes' : 'no';
|
||||
|
|
|
@ -1860,7 +1860,7 @@ class WC_API_Products extends WC_API_Resource {
|
|||
$backorders = get_post_meta( $variation_id, '_backorders', true );
|
||||
|
||||
if ( isset( $variation['backorders'] ) ) {
|
||||
if ( 'notify' == $variation['backorders'] ) {
|
||||
if ( 'notify' === $variation['backorders'] ) {
|
||||
$backorders = 'notify';
|
||||
} else {
|
||||
$backorders = ( true === $variation['backorders'] ) ? 'yes' : 'no';
|
||||
|
|
|
@ -1642,7 +1642,7 @@ class WC_CLI_Product extends WC_CLI_Command {
|
|||
|
||||
if ( 'yes' === $managing_stock ) {
|
||||
if ( isset( $variation['backorders'] ) ) {
|
||||
if ( 'notify' == $variation['backorders'] ) {
|
||||
if ( 'notify' === $variation['backorders'] ) {
|
||||
$backorders = 'notify';
|
||||
} else {
|
||||
$backorders = ( $this->is_true( $variation['backorders'] ) ) ? 'yes' : 'no';
|
||||
|
|
Loading…
Reference in New Issue