set_virtual( true ); $product->set_regular_price( '10' ); $product->set_sale_price( '5' ); $product->save(); $expected = array( 'foo', 'post-' . $product->get_id(), 'product', 'type-product', 'status-publish', 'first', 'instock', 'sale', 'virtual', 'purchasable', 'product-type-simple', ); $this->assertEquals( $expected, array_values( wc_get_product_class( 'foo', $product ) ) ); $product->delete( true ); } }