Title: Call function before delete
Last modified: January 12, 2022

---

# Call function before delete

 *  Resolved [alficzech](https://wordpress.org/support/users/alficzech/)
 * (@alficzech)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/call-function-before-delete/)
 * Hi,
    I use long time this plugin for management Discontinued products in woo.
   If possible call function for missing products in xml (instead of deletion) and
   update product taxonomies
 * [WooCommerce Discontinued Products](https://github.com/twoelevenjay/woocommerce-discontinued-products)
 * Thank you

Viewing 1 replies (of 1 total)

 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/call-function-before-delete/#post-15246149)
 * Hey [@alficzech](https://wordpress.org/support/users/alficzech/),
 * > If possible call function for missing products in xml (instead of deletion)
   > and update product taxonomies
 * Yes, you can write custom code that uses our wp_all_import_is_post_to_delete 
   hook to do that: [https://www.wpallimport.com/documentation/advanced/action-reference/#wp_all_import_is_post_to_delete](https://www.wpallimport.com/documentation/advanced/action-reference/#wp_all_import_is_post_to_delete).
   The idea would be to assign the taxonomy term to the product, then return “false”
   so that it’s not deleted.

Viewing 1 replies (of 1 total)

The topic ‘Call function before delete’ is closed to new replies.

 * ![](https://ps.w.org/wp-all-import/assets/icon-256x256.png?rev=2570179)
 * [WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets](https://wordpress.org/plugins/wp-all-import/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-all-import/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-all-import/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-all-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-all-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-all-import/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/call-function-before-delete/#post-15246149)
 * Status: resolved