Skip to content

Commit d4a8394

Browse files
Merge branch 'main' into feat/add-line
2 parents 00b1bc7 + 2bad2e1 commit d4a8394

File tree

68 files changed

+3355
-437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3355
-437
lines changed

.wordpress-org/banner-1544x500.gif

539 KB
Loading

.wordpress-org/banner-772x250.gif

131 KB
Loading

bitwpfi.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
/**
44
* Plugin Name: Bit Integrations
55
* Plugin URI: https://bitapps.pro/bit-integrations
6-
* Description: Bit Integrations is a platform that integrates with over 290+ 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.6.8
6+
* 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.6.10
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.6.8');
27+
define('BTCBI_VERSION', '2.6.10');
2828
define('BTCBI_PLUGIN_MAIN_FILE', __FILE__);
2929

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

frontend-dev/src/Utils/StaticData/tutorialLinks.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,10 @@ const tutorialLinks = {
638638
line: {
639639
youTubeLink: '',
640640
docLink: 'https://bit-integrations.com/wp-docs/actions/line-integrations/'
641+
},
642+
acpt: {
643+
youTubeLink: '',
644+
docLink: ''
641645
}
642646
}
643647
export default tutorialLinks

frontend-dev/src/Utils/StaticData/webhookIntegrations.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ export const customFormIntegrations = [
7070
'WPSubscription',
7171
'WPTravelEngine',
7272
'WPUserFrontend',
73-
'FluentAffiliate'
73+
'FluentAffiliate',
74+
'EasyCommerce',
75+
'FormGent',
76+
'GeoDirectory',
77+
'StoreEngine'
7478
]
7579

7680
export const actionHookIntegrations = ['ActionHook']
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
/* eslint-disable no-console */
2+
/* eslint-disable no-unused-expressions */
3+
import { useState } from 'react'
4+
import toast from 'react-hot-toast'
5+
import 'react-multiple-select-dropdown-lite/dist/index.css'
6+
import { useNavigate } from 'react-router-dom'
7+
import { __ } from '../../../Utils/i18nwrap'
8+
import SnackMsg from '../../Utilities/SnackMsg'
9+
import Steps from '../../Utilities/Steps'
10+
import { saveIntegConfig } from '../IntegrationHelpers/IntegrationHelpers'
11+
import IntegrationStepThree from '../IntegrationHelpers/IntegrationStepThree'
12+
import ACPTAuthorization from './ACPTAuthorization'
13+
import { checkMappedFields } from './ACPTCommonFunc'
14+
import ACPTIntegLayout from './ACPTIntegLayout'
15+
import {
16+
cptFields,
17+
cptLabels,
18+
modules,
19+
optionPageFields,
20+
taxonomyFields,
21+
taxonomyLabels
22+
} from './staticData'
23+
24+
function ACPT({ formFields, setFlow, flow, allIntegURL }) {
25+
const navigate = useNavigate()
26+
const [isLoading, setIsLoading] = useState(false)
27+
const [loading, setLoading] = useState({})
28+
29+
const [step, setStep] = useState(1)
30+
const [snack, setSnackbar] = useState({ show: false })
31+
32+
const [acptConf, setAcptConf] = useState({
33+
name: 'ACPT',
34+
type: 'ACPT',
35+
base_url: window.location.origin,
36+
api_key: '',
37+
field_map: [{ formField: '', acptFormField: '' }],
38+
label_field_map: [{ formField: '', acptFormField: '' }],
39+
acptFields: [],
40+
acptLabels: [],
41+
utilities: {},
42+
icon: 'wordpress',
43+
capability: 'manage_options',
44+
module: '',
45+
cptFields,
46+
cptLabels,
47+
taxonomyLabels,
48+
taxonomyFields,
49+
optionPageFields,
50+
modules
51+
})
52+
53+
const saveConfig = () => {
54+
setIsLoading(true)
55+
const resp = saveIntegConfig(flow, setFlow, allIntegURL, acptConf, navigate, '', '', setIsLoading)
56+
resp.then(res => {
57+
if (res.success) {
58+
toast.success(res.data?.msg)
59+
navigate(allIntegURL)
60+
} else {
61+
toast.error(res.data || res)
62+
}
63+
})
64+
}
65+
66+
const nextPage = pageNo => {
67+
setTimeout(() => {
68+
document.getElementById('btcd-settings-wrp').scrollTop = 0
69+
}, 300)
70+
71+
if (!checkMappedFields(acptConf)) {
72+
toast.error(__('Please map mandatory fields', 'bit-integrations'))
73+
return
74+
}
75+
76+
if (
77+
['create_cpt', 'update_cpt', 'create_option_page', 'update_option_page'].includes(
78+
acptConf.module
79+
) &&
80+
!acptConf?.icon
81+
) {
82+
toast.error(__('Please select Icon', 'bit-integrations'))
83+
return
84+
}
85+
86+
if (
87+
['create_option_page', 'update_option_page'].includes(acptConf.module) &&
88+
!acptConf?.capability
89+
) {
90+
toast.error(__('Please select Capability', 'bit-integrations'))
91+
return
92+
}
93+
94+
acptConf.field_map.length > 0 && setStep(pageNo)
95+
}
96+
97+
return (
98+
<div>
99+
<SnackMsg snack={snack} setSnackbar={setSnackbar} />
100+
<div className="txt-center mt-2">
101+
<Steps step={3} active={step} />
102+
</div>
103+
104+
{/* STEP 1 */}
105+
<ACPTAuthorization
106+
acptConf={acptConf}
107+
setAcptConf={setAcptConf}
108+
step={step}
109+
setStep={setStep}
110+
loading={loading}
111+
setLoading={setLoading}
112+
/>
113+
114+
{/* STEP 2 */}
115+
<div
116+
className="btcd-stp-page"
117+
style={{
118+
...(step === 2 && { width: 900, minHeight: '400px', height: 'auto', overflow: 'visible' })
119+
}}>
120+
<ACPTIntegLayout
121+
formFields={formFields}
122+
acptConf={acptConf}
123+
setAcptConf={setAcptConf}
124+
loading={loading}
125+
setLoading={setLoading}
126+
isLoading={isLoading}
127+
setIsLoading={setIsLoading}
128+
setSnackbar={setSnackbar}
129+
/>
130+
131+
{acptConf?.module && (
132+
<button
133+
onClick={() => nextPage(3)}
134+
disabled={!checkMappedFields(acptConf)}
135+
className="btn f-right btcd-btn-lg purple sh-sm flx"
136+
type="button">
137+
{__('Next', 'bit-integrations')} &nbsp;
138+
<div className="btcd-icn icn-arrow_back rev-icn d-in-b" />
139+
</button>
140+
)}
141+
</div>
142+
143+
{/* STEP 3 */}
144+
{acptConf?.module && (
145+
<IntegrationStepThree
146+
step={step}
147+
saveConfig={() => saveConfig()}
148+
isLoading={isLoading}
149+
dataConf={acptConf}
150+
setDataConf={setAcptConf}
151+
formFields={formFields}
152+
/>
153+
)}
154+
</div>
155+
)
156+
}
157+
158+
export default ACPT

0 commit comments

Comments
 (0)