Answer the question
In order to leave comments, you need to log in
Importing Woocommerce Remains and My Warehouse?
Hi friends, I found this line in the WooMS plugin
$product->set_stock_status( 'instock' );
$product->set_manage_stock( 'no' );
This code sets the balance as in stock, and disables inventory management.
Actually, you can write:
$product->set_manage_stock( 'yes' );
And here's how to get leftovers from My Warehouse.
----
They get prices like this:
if ( isset( $data_of_source['salePrices'][0]['value'] ) ) {
$price_source = floatval( $data_of_source['salePrices'][0]['value ']);
$price = apply_filters( 'wooms_product_price', $price_source, $data_of_source );
$price = $price / 100;
$product->
$product->set_regular_price( $price );
if ( 0 == $product->get_price()){
$product->set_catalog_visibility('hidden' );
} else {
$product->set_catalog_visibility('visible');
}
}
Who can faced, or will prompt?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question