WordPress filter hook
wp_import_post_comments
Fired by 102 WordPress plugins, running on 16.5M+ sites between them.
How to use wp_import_post_comments
It's a filter: your callback receives the value and 2 more arguments, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'wp_import_post_comments', function( $post, $post_id, $post2 ) {
// Change $post here.
return $post;
}, 10, 3 );Argument names come from Elementor Agent Ready Website Builder's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
102 plugins that fire wp_import_post_comments
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Elementor Agent Ready Website Builder10+ million installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )core/utils/import-export/wp-import.php:772 -
WordPress Importer2+ million installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )class-wp-import.php:815 -
Starter Templates: AI-Powered Website Templates for Elementor & Gutenberg1+ million installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )inc/lib/starter-templates-importer/importer/wxr-importer.php:1443 -
WPvivid900,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/class-wpvivid-importer.php:1216 -
Royal Addons for Elementor600,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )admin/import/class-wordpress-importer.php:822 -
Ocean Extra400,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/onboarding/class/importer/wp-importer.php:842 -
Blocksy Companion300,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )framework/features/demo-install/wp-importer.php:1071 -
Templately300,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )modules/full-site-import/WPImport.php:939 -
Popup Builder200,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )com/libs/SGPBImporter.php:827 -
Kadence Starter Templates200,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )wxr-importer/WXRImporter.php:1322 -
Starter Sites & Templates by Neve100,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/Importers/WP/WP_Import.php:553 -
Jupiter X Core70,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )includes/control-panel-2/includes/class-wxr-importer.php:1238 -
Brizy60,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )import/importer.php:480 -
aThemes Starter Sites30,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )import/wp-content-importer-v2/WXRImporter.php:1327 -
BetterDocs30,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/Admin/Importer/WPImport.php:1346 -
Timetable and Event Schedule by MotoPress30,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )classes/models/class-import.php:801 -
Apollo13 Framework Extensions20,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )design_importer/a13-wordpress-importer/class-apollo13-framework-import.php:485 -
Rara One Click Demo Import20,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )includes/extras/class-wxr-importer.php:1257 -
Envo Extra20,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )lib/envothemes-demo-import/includes/panel/classes/importers/class-wordpress-importer.php:601 -
Demo Importer Plus10,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )inc/importers/wxr-importer/class-wxr-importer.php:1520 -
Animation Addons for Elementor10,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )inc/admin/base/AaeaddonWXRImporter.php:1525 -
Futurio Extra10,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )inc/demo/classes/importers/class-wp-import.php:815 -
Ansar Import10,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/class-wp-import.php:713 -
Nexter Extension10,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )include/nexter-template/importer/class.wordpress-importer.php:844 -
Responsive Starter Templates10,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )includes/importers/wxr-importer/class-wxr-importer.php:1501 -
Qode Essential Addons10,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )inc/admin/inc/admin-pages/sub-pages/import/importer/wordpress-importer.php:904 -
Solace Extra10,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )admin/export-import/class-wp-import.php:883 -
TemplateSpare10,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )includes/companion/importer/class-wxr-importer.php:1306 -
Hester Core10,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )core/admin/demo-library/importers/class-wordpress-importer.php:991 -
AF Companion9,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )inc/importer/class-wxr-importer.php:1259 -
Themebeez Toolkit8,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )includes/demo-importer/importer/class-tt-importer-wxr-importer.php:1453 -
Sinatra Core8,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/admin/demo-library/importers/class-wordpress-importer.php:762 -
Blaze Demo Importer7,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )wordpress-importer/class-wp-import.php:813 -
Mystery Themes Demo Importer6,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/wp-importers/class-mtdi-importer.php:870 -
ThemeHunk Customizer6,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )import/core/importer/class-wxr-importer.php:1283 -
Popularis Extra6,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/panel/classes/importers/class-wordpress-importer.php:762 -
Spexo Addons for Elementor6,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )inc/admin/import/importers/wxr-importer/class-wxr-importer.php:1276 -
Sparkle Demo Importer5,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )wordpress-importer/class-wp-import.php:759 -
HashThemes Demo Importer5,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )wordpress-importer/class-wp-import.php:817 -
Hunk Companion5,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )import/core/importer/class-wxr-importer.php:1283 -
News Magazine X Core4,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )admin/import/importers/wxr-importer.php:1277 -
Kits, Templates and Patterns4,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/importers/wordpress-importer/class-wxr-importer.php:838 -
SKT Themes Demo Import4,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )inc/importer/class-wxr-importer.php:1256 -
News Kit Addons For Elementor3,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )admin/importer/class-wordpress-importer.php:821 -
CubeWP Framework3,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )cube/importer/wordpress-importer.php:813 -
WP Travel3,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )inc/admin/importer/class-wp-import.php:796 -
WP Layouts3,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/site-import/wordpress-importer.php:729 -
Easy Demo Importer2,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )lib/wordpress-importer/class-wp-import.php:975 -
EnvoThemes Demo Import2,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/panel/classes/importers/class-wordpress-importer.php:805 -
Ashe Extra2,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )includes/importers/wxr-importer.php:1270 -
aThemeArt Theme Helper2,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/panel/classes/importers/class-wordpress-importer.php:805 -
Restaurant Menu and Food Ordering2,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )classes/models/class-import.php:486 -
Kenta Companion2,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )src/DemoImporter/ContentImporter/WXRImporter.php:826 -
MantraBrain Starter Sites1,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/importers/wordpress-importer/class-mantrabrain-wxr-importer.php:766 -
Attesa Extra1,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )panel/classes/importers/class-wordpress-importer.php:804 -
CWW Companion1,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )inc/importer/demo-importer/classes/importers/class-wordpress-importer.php:781 -
Anant Sites1,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/class-wp-import.php:684 -
Zita Site Library for Elementor1,000+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )importer/class-wxr-importer.php:1283 -
Di Themes Demo Site Importer1,000+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )inc/di-multipurpose/importers/class-wordpress-importer.php:802 -
Vayu Blocks900+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )inc/vayu-sites/core/importer/class-wxr-importer.php:1345 -
Operation Demo Importer800+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )classes/importers/class-wordpress-importer.php:781 -
Omnipress700+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/Libraries/importer/class-wp-import.php:831 -
Century ToolKit700+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/panel/classes/importers/class-wordpress-importer.php:759 -
Bard Extra600+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/importers/class-wordpress-importer.php:782 -
Theme One Click Demo Importer400+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )inc/core/classes/importer/class-wxr-importer.php:1227 -
RealPress400+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )import/wordpress-importer/class-wp-import.php:874 -
CV Demo Importer300+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/wp-importers/class-cvdi-importer.php:858 -
Academy Starter Templates300+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )includes/library/awesomemotive/wxr-importer.php:1339 -
IT Listings200+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )inc/importers/wordpress-importer/class-wxr-importer.php:785 -
Wishful Companion200+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/panel/classes/importers/class-wordpress-importer.php:762 -
Vertex Addons for Elementor200+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )app/Modules/WPImport/WPImport.php:706 -
Z Companion200+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )import/importer/class-wxr-importer.php:1283 -
Realtyna Provisioning200+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )app/includes/importer/wordpress-importer.php:778 -
Tally Theme Setup100+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )inc/import-xml-old.php:661 -
Perfectwpthemes Toolkit100+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )includes/demo-importer/importer/class-pwpt-importer-wxr-importer.php:1285 -
Templazee100+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )inc/importer/class-wp-import.php:810 -
Smart One Click Setup100+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )inc/CustomWXRImporter.php:1440 -
Novex Demo Importer70+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )lib/wordpress-importer/class-wp-import.php:797 -
Codegear Starter50+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )import/wp-content-importer-v2/WXRImporter.php:1327 -
Quick Demo Import50+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/importers/WXRImporter.php:676 -
Simple Theme Demo Importer Plugin50+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )wordpress-importer.php:750 -
LQThemes Companion40+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )inc/templates-importer/wordpress-importer.php:759 -
Mirrorgrid Demo Importer20+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )includes/importer/class-mg-importer-wxr-importer.php:1267 -
Admire Extra20+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )lib/demo/classes/importers/class-wordpress-importer.php:762 -
EmBe Core20+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )inc/redux/inc/extensions/wbc_importer/inc/importer/wordpress-importer.php:673 -
Long Toolkit20+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )addons/importer/wordpress-importer/wordpress-importer.php:832 -
PASS Addons20+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )admin/common/import/class-wp-import.php:553 -
Elite Elementor Addons and Widgets20+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )admin/import/class-wordpress-importer.php:821 -
TallyKit10+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )components/importer/inc/wordpress-importer.php:674 -
Import Kyero Feed10+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )class-kyero-import.php:903 -
Reactive LITE10+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )reactive-importer.php:771 -
cm4all-wp-impex10+ installs
apply_filters( 'wp_import_post_comments', $post[ContentExporter::SLICE_DATA_POSTS_COMMENTS], $post_id, $post )inc/impex-import-extension-content.php:315 -
Scintilla Demo Importer10+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )lib/wordpress-importer/class-wp-import.php:793 -
WPHobby Demo Import10+ installs
apply_filters( 'wp_import_post_comments', $comments, $post_id, $post )includes/importers/wxr-importer/class-wxr-importer.php:1283 -
Realty Pack Core10+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )app/importer/wordpress-importer.php:778 -
Brand Demo Import10+ installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )inc/wordpress-importer.php:759 -
Azeen CoreFewer than 10 installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )inc/demo/classes/importers/class-wordpress-importer.php:759 -
Codeless Cloud Starter SitesFewer than 10 installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/Importers/WP/WP_Import.php:492 -
Qube ToolsFewer than 10 installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/modules/demo/importers/wpimporter.php:762 -
SaykoAI CompanionFewer than 10 installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/admin/starter-sites/import/class-wp-importer.php:1067 -
Hawk CoreFewer than 10 installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )includes/admin/demo-library/importers/class-wordpress-importer.php:762 -
Wyvern ToolkitFewer than 10 installs
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post )modules/import-export/inc/importers/content-importer/class-wp-import.php:759
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.