Fire a function directly after succesful import

Pending
ImportWP Pro - WordPress XML & CSV Importer ImportWP Pro - WordPress XML & CSV Importer December 15, 2021
Login to reply
J.naaijer@hoogdesign.nl
2 years ago
Goedemorgen, -middag of -avond,



Wauw, het is zover, alweer een jaar voorbij gevlogen!


Hoogdesign staat even op pauze, vanaf 06-01-2021 starten we de boel weer op en knallen we weer door. Tot die tijd genieten we van de kerstdagen en de jaarwisseling.


Op hele fijne feestdagen en 2022 vol goede zaken en gezondheid!



Met positieve groet,

Jaap van Hoogdesign.nl
James Collings Support Agent
2 years ago

The easiest way i can think of would be to write to your servers error log using: https://www.php.net/manual/en/function.error-log.php , or you could write to a file using file_put_contents function passing the FILE_APPEND flag: https://www.php.net/manual/en/function.file-put-contents.php

Jaap Naaijer
2 years ago

Hi, thanks for the help!


I added some code:

https://pastebin.com/gQUJ8NTW here, but it doesn't seem to be working, is there a way to troubleshoot this (i.e, show echoed data)


Jaap

James Collings Support Agent
2 years ago

Hi Jaap,

The template.post_process event is triggered after a record has been updated, an example of hooking into the event listener and adding custom code can be found here: https://pastebin.com/pyLB7KiA

James

Jaap Naaijer
2 years ago

Hi,

As per documentation there are several filters ImportWP uses. Is there a filter/function/hook fired directly after a successful import in which i can fire my own function too? 

Looking forward to hearing from you soon,

Regards,

Jaap