← All changes
|
addons/automator/includes/actions/fluentcrm-actions.php
+7
-7
8.7.7
→
8.8.3
View file →
| @@ -60,9 +60,9 @@ | ||
| 60 | 60 | $cfg = isset( $action_data['config'] ) ? $action_data['config'] : array(); |
| 61 | 61 | $email = trim( $this->parse_tokens( $cfg['email'] ?? '', $trigger_data ) ); |
| 62 | 62 | |
| 63 | 63 | if ( empty( $email ) ) { |
| 64 | - error_log( 'WPbot Automator - FluentCRM: Email is empty after parsing tokens.' ); | |
| 64 | + //error_log( 'WPbot Automator - FluentCRM: Email is empty after parsing tokens.' ); | |
| 65 | 65 | return array( |
| 66 | 66 | 'success' => false, |
| 67 | 67 | 'message' => 'Email address is required for FluentCRM contact creation.', |
| 68 | 68 | ); |
| @@ -68,9 +68,9 @@ | ||
| 68 | 68 | ); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | if ( ! is_email( $email ) ) { |
| 72 | - error_log( 'WPbot Automator - FluentCRM: Invalid email address: ' . $email ); | |
| 72 | + //error_log( 'WPbot Automator - FluentCRM: Invalid email address: ' . $email ); | |
| 73 | 73 | return array( |
| 74 | 74 | 'success' => false, |
| 75 | 75 | 'message' => 'Invalid email address provided for FluentCRM.', |
| 76 | 76 | ); |
| @@ -82,19 +82,19 @@ | ||
| 82 | 82 | 'last_name' => $this->parse_tokens( $cfg['last_name'] ?? '', $trigger_data ), |
| 83 | 83 | 'status' => $cfg['status'] ?? 'subscribed', |
| 84 | 84 | ); |
| 85 | 85 | |
| 86 | - error_log( 'WPbot Automator - FluentCRM Contact Data: ' . wp_json_encode( $contact_data ) ); | |
| 86 | + //error_log( 'WPbot Automator - FluentCRM Contact Data: ' . wp_json_encode( $contact_data ) ); | |
| 87 | 87 | |
| 88 | 88 | try { |
| 89 | 89 | $api = FluentCrmApi( 'contacts' ); |
| 90 | - error_log( 'WPbot Automator - FluentCRM API object type: ' . gettype( $api ) ); | |
| 90 | + //error_log( 'WPbot Automator - FluentCRM API object type: ' . gettype( $api ) ); | |
| 91 | 91 | if ( is_object( $api ) ) { |
| 92 | - error_log( 'WPbot Automator - FluentCRM API class: ' . get_class( $api ) ); | |
| 92 | + //error_log( 'WPbot Automator - FluentCRM API class: ' . get_class( $api ) ); | |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | $contact = $api->createOrUpdate( $contact_data ); |
| 96 | - error_log( 'WPbot Automator - FluentCRM createOrUpdate result: ' . ( is_object( $contact ) ? 'OBJECT (ID: ' . $contact->id . ')' : ( $contact ? 'TRUE/POS' : 'FALSE/NEG' ) ) ); | |
| 96 | + //error_log( 'WPbot Automator - FluentCRM createOrUpdate result: ' . ( is_object( $contact ) ? 'OBJECT (ID: ' . $contact->id . ')' : ( $contact ? 'TRUE/POS' : 'FALSE/NEG' ) ) ); | |
| 97 | 97 | |
| 98 | 98 | if ( $contact ) { |
| 99 | 99 | return array( |
| 100 | 100 | 'success' => true, |
| @@ -102,9 +102,9 @@ | ||
| 102 | 102 | 'fluentcrm_contact_id' => isset( $contact->id ) ? $contact->id : 0, |
| 103 | 103 | ); |
| 104 | 104 | } |
| 105 | 105 | } catch ( \Exception $e ) { |
| 106 | - error_log( 'WPbot Automator - FluentCRM Exception: ' . $e->getMessage() ); | |
| 106 | + //error_log( 'WPbot Automator - FluentCRM Exception: ' . $e->getMessage() ); | |
| 107 | 107 | return array( |
| 108 | 108 | 'success' => false, |
| 109 | 109 | 'message' => 'FluentCRM Error: ' . $e->getMessage(), |
| 110 | 110 | ); |