set_backorders
This commit is contained in:
parent
cd847fb4ea
commit
f927305443
|
@ -423,12 +423,12 @@ class Products extends AbstractObjectsController {
|
|||
|
||||
if ( $product->is_type( 'grouped' ) ) {
|
||||
$product->set_manage_stock( false );
|
||||
$product->set_backorders( false );
|
||||
$product->set_backorders( 'no' );
|
||||
$product->set_stock_quantity( '' );
|
||||
$product->set_stock_status( $stock_status );
|
||||
} elseif ( $product->is_type( 'external' ) ) {
|
||||
$product->set_manage_stock( false );
|
||||
$product->set_backorders( false );
|
||||
$product->set_backorders( 'no' );
|
||||
$product->set_stock_quantity( '' );
|
||||
$product->set_stock_status( 'instock' );
|
||||
} elseif ( $product->get_manage_stock() ) {
|
||||
|
|
|
@ -281,7 +281,7 @@ class Products extends WC_REST_Unit_Test_Case {
|
|||
);
|
||||
$response = $this->server->dispatch( $request );
|
||||
$data = $response->get_data();
|
||||
|
||||
var_dump($data);
|
||||
$this->assertEquals( 'Test API Update', $data['button_text'] );
|
||||
$this->assertEquals( 'http://automattic.com', $data['external_url'] );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue