PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 2.4.5
Fluent Support – Helpdesk & Customer Support Ticket System v2.4.5
2.4.5 2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 All 69 releases
← All changes | app/Services/FluentCRMServices.php +6 -9 2.3.0 → 2.4.5 View file →
@@ -6,9 +6,10 @@
6 6
7 7 class FluentCRMServices
8 8 {
9 9 /**
10 - * This `syncCrmTags` method is used to sync tags from FluentCRM to Fluent Support.
10 + * Set the FluentCRM contact's tags to exactly $data['tags'].
11 + *
11 12 * @param array $data
12 13 * @return array
13 14 * @throws Exception
14 15 */
@@ -33,9 +34,10 @@
33 34 ];
34 35 }
35 36
36 37 /**
37 - * This `syncCrmLists` method is used to sync lists from FluentCRM to Fluent Support.
38 + * Set the FluentCRM contact's lists to exactly $data['lists'].
39 + *
38 40 * @param array $data
39 41 * @return array
40 42 * @throws Exception
41 43 */
@@ -59,10 +61,9 @@
59 61 ];
60 62 }
61 63
62 64 /**
63 - * This `addOrRemoveTag` method will add or remove tags from FluentCRM contact from Fluent Support.
64 - * @param array $contact
65 + * @param \FluentCrm\App\Models\Subscriber $contact
65 66 * @param array $tagIds
66 67 * @return mixed
67 68 */
68 69 public function addOrRemoveTag ( $contact, $tagIds )
@@ -86,10 +87,9 @@
86 87 return $contact;
87 88 }
88 89
89 90 /**
90 - * This `addOrRemoveList` method will add or remove lists from FluentCRM contact from Fluent Support.
91 - * @param array $contact
91 + * @param \FluentCrm\App\Models\Subscriber $contact
92 92 * @param array $listIds
93 93 * @return mixed
94 94 */
95 95 public function addOrRemoveList ( $contact, $listIds )
@@ -113,9 +113,8 @@
113 113
114 114 return $contact;
115 115 }
116 116
117 - // This `checkCrmPermission` method will check current agent has permission to access to modify customer's FluentCRM data
118 117 private function checkCrmPermission ()
119 118 {
120 119 $canAddTags = \FluentCrm\App\Services\PermissionManager::currentUserCan('fcrm_manage_contacts');
121 120 $canAddTags = apply_filters('fluent_support/can_user_add_tags_to_customer', $canAddTags);
@@ -126,9 +125,8 @@
126 125 return true;
127 126 }
128 127 }
129 128
130 - // This `isCrmEnabled` method will check FluentCRM is enabled or not
131 129 private function isCrmEnabled ()
132 130 {
133 131 if ( !defined('FLUENTCRM') ) {
134 132 throw new \Exception(esc_html__('FluentCRM is not installed or enabled', 'fluent-support'));
@@ -136,9 +134,8 @@
136 134 return true;
137 135 }
138 136 }
139 137
140 - // This `isContactAvailable` method will check if contact is valid or not
141 138 private function isContactAvailable ( $contactId )
142 139 {
143 140 if (!$contactId) {
144 141 throw new \Exception(esc_html__('Contact could not be found', 'fluent-support'));