Title: Run function before import
Last modified: September 18, 2018

---

# Run function before import

 *  Resolved [akladnja1991](https://wordpress.org/support/users/akladnja1991/)
 * (@akladnja1991)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/run-function-before-import/)
 * Hi,
 * I need some help with custom code for WP All Import. I found this:
    [http://www.wpallimport.com/documentation/advanced/action-reference/](http://www.wpallimport.com/documentation/advanced/action-reference/)
   But I dont know where to put the code. Where can I call the action and where 
   do I have to add it?
 * The goal is to start a function every time the import is started.
    Where can 
   I add custom code to wpallimport? Especially for the before import function.
 * Thank you!
 * Best regards
    Amer

Viewing 1 replies (of 1 total)

 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/run-function-before-import/#post-10704451)
 * Hi [@akladnja1991](https://wordpress.org/support/users/akladnja1991/)
 * You can use the pmxi_before_xml_import hook to run code before the import starts
   processing: [https://github.com/soflyy/wp-all-import-action-reference/blob/master/all-import/pmxi_before_xml_import.php](https://github.com/soflyy/wp-all-import-action-reference/blob/master/all-import/pmxi_before_xml_import.php).
   Your code can be added inside the Function Editor at All Import -> Settings, 
   or you can add it to your child themes functions.php file.

Viewing 1 replies (of 1 total)

The topic ‘Run function before import’ 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/)

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)

 * 1 reply
 * 2 participants
 * Last reply from: [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/run-function-before-import/#post-10704451)
 * Status: resolved