Rachele Lo Piano

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Decrease/increase the stock inventory #85922
    Rachele Lo Piano
    Participant

    Hi Tom,

    I send you a message answering your e-mail last Thursday, but I didn’t receive any answer. So I will send you the message here again.
    Using The order ID’s argument the sock trigger is working (without pre tag) but I cannot get the way it decreases stock.
    1) when the decrease happens for an order happens only once for order, so If I call the trigger after for a second time it doesn’t decrease a second time?
    2) all the product in the order are decreased? There is a way to tell it to trigger only on some product in the order? If I add some product I do not want the stock to be decreased for all the item in the order.
    3) If I remove the standard woo commerce trigger, how it works in the admin area? If I trash an order the stock is still managed or not?

    I have actually a custom bit complicated system which any time an order is put, removes the order created and put items in a custom unique order for each customer. I’m trying to manage stock but it’s a bit difficult for in my flow the order A gets created (stock decrease), the order A get trashed (the stock increase), the item of the previous order are put in the unique already existent order B and in this case I should decrease the stock of the unique order B for the items added.

    Thank you so much for your help.

    in reply to: Decrease/increase the stock inventory #85920
    Rachele Lo Piano
    Participant

    Hi Tom,

    I finally bought the plugin and I’m trying activating some custom triggers.

    I added a:

    add_action( 'some_action', 'some_function', 10, 0 );

    and then, in the point I want to execute it:

    do_action( 'some_action' );

    … but it’s not working. Do you have some documentation about how to make the custom triggers work? Could you help me with some tips?

    Thank you and best regards,
    Rachele

Viewing 2 posts - 1 through 2 (of 2 total)