@fredsaf, thanks for getting in touch with us.
As per our default flow, the stock alert mail depends on the “Manage Stock” option: https://prnt.sc/qqmasi
Now, if you want to change the flow, you need to do some custom code. Let us know if you need reference of hook/filter.
Hello there, could you please let us know of the available hook/filter for getting notified when also status changes from out of stock to in stock?
Thank you
@alpinecodes, we have a filter apply_filters( 'dc_wc_product_stock_alert_do_complete_additional_task', false );
You first need to return true corresponding to above filter then you can able to do further modification with the following action
do_action( 'dc_wc_product_stock_alert_new_subscriber_added', $customer_email, $product_id );
Please note the above filter also triggers the In Stock mail. Hence, when you will be adding your modification, you need to add our code that will trigger the In-Stock mail also.
Good morning @dualcube , I’m trying to get automatic emails working when I switch from “not in stock” to “in stock”, but it doesn’t work. I have added the code at the end of functions.php. Do I have to do anything else to make it work?
apply_filters( 'dc_wc_product_stock_alert_do_complete_additional_task', false );
do_action( 'dc_wc_product_stock_alert_new_subscriber_added', $customer_email, $product_id );
Neither are interested customers shown in the “Interested Person(s)” column of the products page in admin.
The email “You have subscribed a product on ***” works correctly.
Thank you very much.
-
This reply was modified 6 years, 3 months ago by
alberto3.
-
This reply was modified 6 years, 3 months ago by
alberto3.