Skip to content

Commit bcb97e0

Browse files
authored
Merge pull request #125 from Bit-Apps-Pro/rishad-dev-tmp
Version Updated to v2.7.2
2 parents 3c65965 + 5a4a8ea commit bcb97e0

File tree

13 files changed

+399
-422
lines changed

13 files changed

+399
-422
lines changed

bitwpfi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Plugin Name: Bit Integrations
55
* Plugin URI: https://bitapps.pro/bit-integrations
66
* Description: Bit Integrations is a platform that integrates with over 300+ different platforms to help with various tasks on your WordPress site, like WooCommerce, Form builder, Page builder, LMS, Sales funnels, Bookings, CRM, Webhooks, Email marketing, Social media and Spreadsheets, etc
7-
* Version: 2.7.1
7+
* Version: 2.7.2
88
* Author: Automation & Integration Plugin - Bit Apps
99
* Author URI: https://bitapps.pro
1010
* Text Domain: bit-integrations
@@ -24,7 +24,7 @@
2424
$btcbi_db_version = '1.1';
2525

2626
// Define most essential constants.
27-
define('BTCBI_VERSION', '2.7.1');
27+
define('BTCBI_VERSION', '2.7.2');
2828
define('BTCBI_PLUGIN_MAIN_FILE', __FILE__);
2929

3030
require_once plugin_dir_path(__FILE__) . 'includes/loader.php';

frontend-dev/src/components/AllIntegrations/Salesforce/SalesforceActions.jsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,25 @@ export default function SalesforceActions({
109109
return (
110110
<div className="pos-rel">
111111
<div className="d-flx flx-wrp">
112+
{salesforceConf.actionName === 'contact-create' && (
113+
<div style={{ display: 'flex', flexDirection: 'column' }}>
114+
<TableCheckBox
115+
onChange={e => actionHandler(e.target.checked, 'update')}
116+
checked={salesforceConf?.actions?.update ?? false}
117+
className="wdt-200 mt-4 mr-2"
118+
value="update"
119+
isInfo={!isPro}
120+
title={<ProFeatureTitle title={__('Update Contact', 'bit-integrations')} />}
121+
subTitle={
122+
<ProFeatureSubtitle
123+
title={__('Update', 'bit-integrations')}
124+
subtitle={__('Update existing contact.', 'bit-integrations')}
125+
proVersion="2.7.2"
126+
/>
127+
}
128+
/>
129+
</div>
130+
)}
112131
{salesforceConf.actionName === 'opportunity-create' && (
113132
<div style={{ display: 'flex', flexDirection: 'column' }}>
114133
<TableCheckBox

frontend-dev/src/components/AllIntegrations/Salesforce/SalesforceIntegLayout.jsx

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -391,24 +391,18 @@ export default function SalesforceIntegLayout({
391391
)}
392392
<br />
393393
<br />
394-
{['opportunity-create', 'lead-create', 'event-create', 'case-create', 'account-create'].includes(
395-
salesforceConf?.actionName
396-
) && (
397-
<>
398-
<div className="mt-4">
399-
<b className="wdt-100">{__('Utilities', 'bit-integrations')}</b>
400-
</div>
401-
<div className="btcd-hr mt-1" />
402-
<SalesforceActions
403-
salesforceConf={salesforceConf}
404-
setSalesforceConf={setSalesforceConf}
405-
formFields={formFields}
406-
/>
407-
</>
408-
)}
394+
<div className="mt-4">
395+
<b className="wdt-100">{__('Utilities', 'bit-integrations')}</b>
396+
</div>
397+
<div className="btcd-hr mt-1" />
398+
<SalesforceActions
399+
salesforceConf={salesforceConf}
400+
setSalesforceConf={setSalesforceConf}
401+
formFields={formFields}
402+
/>
409403
<br />
410404
<br />
411-
<Note note={note} />
405+
<Note note={note} maxWidth="900px" />
412406
</>
413407
)
414408
}
@@ -421,37 +415,46 @@ const note = `
421415
<abbr title="International Organization for Standardization">ISO</abbr> 8601 standards.
422416
</p>
423417
424-
<h2>Date Fields</h2>
425-
<p>The recommended format is:</p>
426-
<pre><code>YYYY-MM-DD</code></pre>
427-
<p>For example: <code>2025-09-20</code></p>
418+
<div class="flx" style="align-items: flex-start;">
419+
<div style="flex: -1;">
420+
<h2>Date Fields</h2>
421+
<p>The recommended format is:</p>
422+
<pre><code>YYYY-MM-DD</code></pre>
423+
<p>For example: <code>2025-09-20</code></p>
424+
</div>
428425
429-
<h2>DateTime Fields</h2>
430-
<p>
431-
The recommended formats, which include time and often a timezone indicator, are:
432-
</p>
433-
<pre><code>YYYY-MM-DDThh:mm:ssZ</code></pre>
434-
<pre><code>YYYY-MM-DDThh:mm:ss.sssZ</code></pre>
426+
<div class="ml-2" style="flex: 1; text-align: justify;">
427+
<h2>DateTime Fields</h2>
428+
<p>
429+
The recommended formats, which include time and often a timezone indicator, are:
430+
</p>
431+
<pre><code>YYYY-MM-DDThh:mm:ssZ</code></pre>
432+
<pre><code>YYYY-MM-DDThh:mm:ss.sssZ</code></pre>
435433
436-
<p>
437-
Here, <code>Z</code> indicates Coordinated Universal Time (UTC), and <code>sss</code> represents milliseconds.
438-
</p>
439-
<p>
440-
For example: <code>2025-09-20T10:30:00Z</code> or
441-
<code>2025-09-20T10:30:00.123Z</code>
442-
</p>
443434
444-
<h2>Other Notes</h2>
445-
<p>
446-
While other formats like <code>MM/DD/YYYY</code> might be accepted in certain contexts
447-
(such as <em>Data Loader</em> with specific settings), using the ISO 8601 format
448-
(<code>YYYY-MM-DD</code> for dates and
449-
<code>YYYY-MM-DDThh:mm:ssZ</code> or <code>YYYY-MM-DDThh:mm:ss.sssZ</code> for datetimes)
450-
ensures compatibility and avoids potential issues across various Salesforce APIs and tools.
451-
</p>
435+
<p>
436+
Here, <code>Z</code> indicates Coordinated Universal Time (UTC), and <code>sss</code> represents milliseconds.
437+
</p>
438+
<p>
439+
For example: <code>2025-09-20T10:30:00Z</code> or
440+
<code>2025-09-20T10:30:00.123Z</code>
441+
</p>
442+
</div>
452443
453-
<p>
454-
When working with <strong>REST API queries</strong>, filtering date fields should also adhere
455-
to the <code>YYYY-MM-DD</code> format.
456-
</p>
444+
<div class="ml-2" style="flex: 1; text-align: justify;">
445+
<h2>Other Notes</h2>
446+
<p>
447+
While other formats like <code>MM/DD/YYYY</code> might be accepted in certain contexts
448+
(such as <em>Data Loader</em> with specific settings), using the ISO 8601 format
449+
(<code>YYYY-MM-DD</code> for dates and
450+
<code>YYYY-MM-DDThh:mm:ssZ</code> or <code>YYYY-MM-DDThh:mm:ss.sssZ</code> for datetimes)
451+
ensures compatibility and avoids potential issues across various Salesforce APIs and tools.
452+
</p>
453+
454+
<p>
455+
When working with <strong>REST API queries</strong>, filtering date fields should also adhere
456+
to the <code>YYYY-MM-DD</code> format.
457+
</p>
458+
</div>
459+
</div>
457460
`

frontend-dev/src/components/Triggers/ActionHook.jsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ const ActionHook = () => {
5454
toast.error(__('Please Select Fields', 'bit-integrations'))
5555
return
5656
}
57-
if (!primaryKey) {
58-
toast.error(__('Please Select a Primary Key', 'bit-integrations'))
59-
return
60-
}
6157

6258
const tmpNewFlow = { ...newFlow }
6359
tmpNewFlow.triggerData = {
@@ -351,7 +347,7 @@ const ActionHook = () => {
351347
onClick={setTriggerData}
352348
className="btn btcd-btn-lg purple sh-sm flx"
353349
type="button"
354-
disabled={!selectedFields.length || !primaryKey}>
350+
disabled={!selectedFields.length}>
355351
{__('Set Action', 'bit-integrations')}
356352
</button>
357353
</div>

frontend-dev/src/components/Triggers/TriggerHelpers/TriggerStateHelper.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,8 @@ export const UltimateMemberStateIH = (tmpConf, flowData) => {
993993
tmpConf.allRole = flowData.allRole
994994
}
995995

996+
tmpConf.fields = flowData.fields
997+
996998
return tmpConf
997999
}
9981000

frontend-dev/src/pages/ChangelogToggle.jsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { __, sprintf } from '../Utils/i18nwrap'
1111

1212
// const source = !btcbi.isPro ? 'bit-integrations' : 'bit-integrations-pro'
1313
// const dealURL = `https://bitapps.pro/new-year-deal/#bit-integrations-pricing`
14-
const releaseDate = '08th November 2025'
14+
const releaseDate = '26th November 2025'
1515

1616
// Changelog items format [{ 'label': '', 'desc': '', 'isPro': true }]
1717
const changeLog = [
@@ -39,8 +39,8 @@ const changeLog = [
3939
itemClass: 'feature-list',
4040
items: [
4141
{
42-
label: 'MemberPress',
43-
desc: 'Added support for user custom fields to extend integration flexibility.',
42+
label: 'Salesforce',
43+
desc: 'Added support for updating existing contacts directly from workflows.',
4444
isPro: true
4545
}
4646
]
@@ -51,13 +51,13 @@ const changeLog = [
5151
itemClass: 'feature-list',
5252
items: [
5353
{
54-
label: 'GiveWP',
55-
desc: 'Enhanced trigger functionality with improved data listening.',
56-
isPro: true
54+
label: 'Salesforce',
55+
desc: 'Added proper date-field formatting for more reliable syncing.',
56+
isPro: false
5757
},
5858
{
5959
label: 'Action Hook',
60-
desc: 'Added default field type for triggers to ensure smoother workflows.',
60+
desc: 'Removed unnecessary primary-key prevention for smoother custom automation handling.',
6161
isPro: true
6262
}
6363
]
@@ -68,29 +68,29 @@ const changeLog = [
6868
itemClass: 'fixes-list',
6969
items: [
7070
{
71-
label: 'Mailchimp',
72-
desc: 'Fixed issue with updating existing contacts.',
71+
label: 'MailMint',
72+
desc: 'Resolved the issue causing errors while updating contact timelines.',
7373
isPro: false
7474
},
7575
{
76-
label: 'GetResponse',
77-
desc: 'Fixed issue with updating existing contacts.',
76+
label: 'GiveWP',
77+
desc: 'Fixed donor meta field syncing inconsistencies.',
7878
isPro: false
7979
},
8080
{
81-
label: 'Telegram',
82-
desc: 'Fixed blank page issue triggered by Action Hook to Telegram.',
81+
label: 'Zoho Sheet',
82+
desc: 'Corrected the header-fetching issue that prevented proper data mapping.',
8383
isPro: false
8484
},
8585
{
86-
label: 'GamiPress',
87-
desc: 'Corrected fetching utilities query issue.',
86+
label: 'Ultimate Member',
87+
desc: 'Fixed the problem where edited integration fields would disappear.',
8888
isPro: false
8989
},
9090
{
91-
label: 'Sendy',
92-
desc: 'Authorization issue has been fixed.',
93-
isPro: false
91+
label: 'Divi Form (Divi Engine)',
92+
desc: 'Addressed a bug where the form type returned a null value.',
93+
isPro: true
9494
}
9595
]
9696
}

includes/Actions/GiveWp/RecordApiHelper.php

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,31 @@ public function generateReqDataFromFieldMap($data, $fieldMap)
2727

2828
public function createGiveWpDonar($finalData)
2929
{
30+
if (empty($finalData['name'])) {
31+
$finalData['name'] = ($finalData['first_name'] ?? '') . ' ' . ($finalData['last_name'] ?? '');
32+
}
33+
34+
$metaKeys = [
35+
'_give_donor_first_name' => 'first_name',
36+
'_give_donor_last_name' => 'last_name',
37+
];
38+
39+
if (!class_exists('Give_Donor') || !\function_exists('Give')) {
40+
return;
41+
}
42+
3043
$donor = new Give_Donor();
44+
$donorId = $donor->create($finalData);
45+
46+
if (is_numeric($donorId)) {
47+
foreach ($metaKeys as $metaKey => $field) {
48+
if (isset($finalData[$field])) {
49+
Give()->donor_meta->update_meta($donorId, $metaKey, $finalData[$field]);
50+
}
51+
}
52+
}
3153

32-
return $donor->create($finalData);
54+
return $donorId;
3355
}
3456

3557
public function execute(

includes/Actions/MailMint/RecordApiHelper.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ public function execute(
185185
$selectedTags = $integrationDetails->selectedTags;
186186
$selectedSubStatus = $integrationDetails->selectedSubStatus;
187187
$apiResponse = $this->updateContact($selectedList, $selectedTags, $selectedSubStatus, $finalData, $contactExist);
188-
if ($apiResponse && (\gettype($apiResponse) == 'integer' || (\gettype($apiResponse) == 'boolean' && $apiResponse == true))) {
188+
189+
if ($apiResponse && (is_numeric($apiResponse) || (\is_bool($apiResponse) && $apiResponse))) {
189190
LogHandler::save(self::$integrationID, ['type' => 'update', 'type_name' => 'update contact'], 'success', __('Contact updated successfully', 'bit-integrations'));
190191
} else {
191192
LogHandler::save(self::$integrationID, ['type' => 'update', 'type_name' => 'update contact'], 'error', __('Failed to create contact', 'bit-integrations'));

0 commit comments

Comments
 (0)