nvm
]]>doesn’t increase stock when change status from my custom status(Verified) to cancelled
]]>There used to be an option to manually reduce and increase stock of line items. It seems to have gone away. Is there a way to bring it back?
]]>Hi,
I installed your plugin, which works fine for most cases, but not when I modify an order (the quantity of an item in the order).
Any knowledge of that and fix that you would know of?
Thanks for the reply. Best,
Yannick
]]>Hey! I’ve been able to create a code to change the order status directly to ‘processing’ when someone clicks the ‘pay order’ button.
It reduce the stocks automatticaly and immediately, don’t know if will help you, also don’t know if you plan to do this here or in the PagSeguro plugin.
Anyways, here is it:
add_filter( 'woocommerce_can_reduce_order_stock', 'wcs_do_not_reduce_onhold_stock', 10, 2 );
function wcs_do_not_reduce_onhold_stock( $reduce_stock, $order ) {
if ( $order->has_status( 'on-hold' ) || $order->has_status( 'pending' ) || $order->has_status( 'completed' )) {
$reduce_stock = false;
}
return $reduce_stock;
}
add_action( 'woocommerce_checkout_order_processed', 'changing_order_status_before_payment', 10, 3 );
function changing_order_status_before_payment( $order_id, $posted_data, $order ){
$order->update_status( 'processing' );
$stock_reduced = get_post_meta( $order_id, '_order_stock_reduced', true );
if( empty($stock_reduced) ){
wc_reduce_stock_levels($order_id);
}
}
]]>
I’ve tried to alter this plugin with this:
$statuses = apply_filters( 'rsmo_wc_reduce_stock_statuses', array( 'on-hold', 'pending' ) );
The default is:
$statuses = apply_filters( 'rsmo_wc_reduce_stock_statuses', array( 'processing', 'completed' ) );
Because ‘on-hold'(aguardando pagamneto) and ‘pending'(pagamento pendente) means that someone intend to pay it, and the payment method boleto can takes days to be approved.
Unfortunately it’s not working, could you tell me if the values (‘on-hold’, ‘pending’) are correct? Would you have any guess on why it’s not working?
Thanks for your time!
Really great plugin.
]]>Hello! At WP 4.9.4+Woocommerce 3.3.3 doesn’t increase stock ammount if order status chanched to CANCELED.
Reduce function is working fine!
Can you fix this problem? Thanks!
When an order comes via the front-end, stock is reduced as normal. But when that order is changed to Completed via the back-end, stock is reduced a second time. Should this plugin differentiate between front-end orders and manual orders?
]]>HI,
Can I sit one of my payment-getaway not to be affected by “Order status changed to Canceled”
]]>Quando eu fa?o um pedido no meu site, o plugin altera o status para processando e o estoque diminui -1 automaticamente, até ai tudo certo. O problema acontece quando eu altero o status para concluído, dai o plugin reduz o estoque novamente, tem algum action para que eu posso impedir isso? Obrigado!
]]>Olá,
Gostaria de saber se este plugin funcionaria para reduzir o estoque no caso de uma comprar por boleto (PagSeguro), até que o pagamento seja confirmado. Caso o pedido seja cancelado ele volta o produto ao estoque? Seria isso?
Ele funciona com a última vers?o do wordpress e woocommerce?
Muito obrigado!
Lucas
]]>Primeiramente parabéns pela iniciativa pelo plugin.
O plugin tem falha duplicando as baixas, mas foi resolvido removendo a linha abaixo indicado pelo Rodilane.
$statuses = apply_filters( ‘rsmo_wc_reduce_stock_statuses’, array( ‘processing’ ) );
O sistema deu baixa corretamente e ainda consigo repor o estoque automaticamente com o plugin Restaure Stock mas, com o PagSeguro n?o funciona!
é impressionante o tanto de coisas que n?o funcionam com a PagSeguro e com o PayPal funcionam.
Até mesmo A confirma??o de pagamento tive que liberar os IP da PagSeguro, já com PayPal n?o precisamos disso.
Fico imaginando por causa da UOL ter sua própria loja virtual, n?o fica dificultando a vida de quem tem plataformas diferentes?
Acho que vou desistir da PagSeguro para mim e para os meus clientes.
]]>Hi!
Thanks for the great plugin!
We just updated to WC 3.0.7 and now when we change an order from Completed to Cancelled it no longer returns the cancelled order to the stock level. Otherwise the plugin seems to work just fine and stock levels are reduced when orders are made in the admin.
I also opened an issue in github:
https://github.com/claudiosanches/reduce-stock-of-manual-orders-for-woocommerce/issues/2
seria possível reduzir o estoque somente no Status “processando”? Por o estoque é reduzido nos dois status, ficando com baixa duplicada.
]]>Após inserir código de rastreio manualmente, todos os itens do pedido tem estoque reduzido novamente.
]]>I see that cancelled stock will restore the stock to what it was before, but what about for orders that are designated as “refunded”?
]]>Hello,
This plugin is exactly what i’m looking for.
But I had a small issue with the order list screen.
It seems, that the status from this screen is not wc-processing but processing…. it seems strange but if I change the can_reduce_stock function by adding “processing” and “completed” it works fine.
In the order screen, it was OK with “wc-processing” status.
`protected function can_reduce_stock( $order_id, $status ) {
return in_array( $status, array( ‘wc-processing’, ‘wc-completed’, ‘processing’, ‘completed’ ), true ) && ‘1’ !== get_post_meta( $order_id, ‘_order_stock_reduced’, true );’
Do you know how we can explain that?
]]>Hello,
If I change the order status to be cancel, it will increase 2 stock.
If change it to be refunded, it works properly, stock will increase 1.
Thanks.
]]>Hi Claudio
Thanks for this plugin, it is exactly what we needed.
However it appeared to work perfectly for one order and is now not working. We have not updated any other software since installation, we have deactivated and re-activated the plugin but no help.
We are not getting any errors in the Browser Console or on the Server logs.
We switched to Twenty Sixteen theme and de-activate all but essential WooCommerce plugins. Still no luck.
Can you give us any debug tips to check what is going on?
]]>