finished comment integration, it should be working now

This commit is contained in:
2026-03-17 13:47:55 +01:00
parent 76eb96666b
commit f58248a8e7
10 changed files with 689 additions and 29 deletions

View File

@@ -1,7 +1,7 @@
<?php
class Partnerexpo_Core_Integrations {
public static function add_hooks($loader) {
public static function add_hooks($loader, $crm_client) {
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mc-integrations/com-form.php';
if ( ! $loader ) {
@@ -9,7 +9,9 @@ class Partnerexpo_Core_Integrations {
return;
}
$loader->add_action( 'comment_post', Partnerexpo_Core_Integration_Comment_Form::class, 'queue_up', 10, 3 );
$loader->add_action( 'process_comment_data', Partnerexpo_Core_Integration_Comment_Form::class, 'run_process', 10, 1 );
$comment_form_integration = new Partnerexpo_Core_Integration_Comment_Form($crm_client);
$loader->add_action( 'comment_post', $comment_form_integration, 'queue_up', 10, 3 );
$loader->add_action( 'process_comment_data', $comment_form_integration, 'run_process', 10, 1 );
}
}