Changeset 3427134
- Timestamp:
- 12/25/2025 07:20:44 AM (3 weeks ago)
- Location:
- crm-integration-freshworks-any-form
- Files:
-
- 85 added
- 11 edited
-
tags/1.0.12 (added)
-
tags/1.0.12/assets (added)
-
tags/1.0.12/assets/css (added)
-
tags/1.0.12/assets/css/auth.css (added)
-
tags/1.0.12/assets/css/authentication.css (added)
-
tags/1.0.12/assets/css/banner.css (added)
-
tags/1.0.12/assets/css/error-log.css (added)
-
tags/1.0.12/assets/css/help.css (added)
-
tags/1.0.12/assets/css/home.css (added)
-
tags/1.0.12/assets/css/memory.css (added)
-
tags/1.0.12/assets/css/options.css (added)
-
tags/1.0.12/assets/css/other-plugins.css (added)
-
tags/1.0.12/assets/css/premium-feature.css (added)
-
tags/1.0.12/assets/css/premium.css (added)
-
tags/1.0.12/assets/css/settings.css (added)
-
tags/1.0.12/assets/css/setup-fm.css (added)
-
tags/1.0.12/assets/css/setup.css (added)
-
tags/1.0.12/assets/img (added)
-
tags/1.0.12/assets/img/close.png (added)
-
tags/1.0.12/assets/img/loading-icon.gif (added)
-
tags/1.0.12/assets/img/loading-icon.png (added)
-
tags/1.0.12/assets/img/loading-icon.svg (added)
-
tags/1.0.12/assets/img/loading.gif (added)
-
tags/1.0.12/assets/img/logo.png (added)
-
tags/1.0.12/assets/img/tick.png (added)
-
tags/1.0.12/assets/img/zoho-logo-1.png (added)
-
tags/1.0.12/assets/img/zoho-logo.png (added)
-
tags/1.0.12/assets/js (added)
-
tags/1.0.12/assets/js/auth.js (added)
-
tags/1.0.12/assets/js/common.js (added)
-
tags/1.0.12/assets/js/error-log.js (added)
-
tags/1.0.12/assets/js/help.js (added)
-
tags/1.0.12/assets/js/home.js (added)
-
tags/1.0.12/assets/js/options.js (added)
-
tags/1.0.12/assets/js/review.js (added)
-
tags/1.0.12/assets/js/setup-fm.js (added)
-
tags/1.0.12/crm-integration-freshworks-any-form.php (added)
-
tags/1.0.12/includes (added)
-
tags/1.0.12/includes/admin (added)
-
tags/1.0.12/includes/admin/accounts-tab.php (added)
-
tags/1.0.12/includes/admin/admin.php (added)
-
tags/1.0.12/includes/admin/banner.php (added)
-
tags/1.0.12/includes/admin/errorlog-tab.php (added)
-
tags/1.0.12/includes/admin/other-plugins.php (added)
-
tags/1.0.12/includes/admin/premium-tab.php (added)
-
tags/1.0.12/includes/admin/settings-tab.php (added)
-
tags/1.0.12/includes/admin/setup-existing.php (added)
-
tags/1.0.12/includes/admin/setup-new.php (added)
-
tags/1.0.12/includes/admin/setup-tab.php (added)
-
tags/1.0.12/includes/class-includes.php (added)
-
tags/1.0.12/includes/extend (added)
-
tags/1.0.12/includes/extend/auth.php (added)
-
tags/1.0.12/includes/extend/error-log.php (added)
-
tags/1.0.12/includes/extend/extend.php (added)
-
tags/1.0.12/includes/extend/setup.php (added)
-
tags/1.0.12/includes/function (added)
-
tags/1.0.12/includes/function/common-actions.php (added)
-
tags/1.0.12/includes/function/notice.php (added)
-
tags/1.0.12/includes/function/review.php (added)
-
tags/1.0.12/includes/function/session-notice.php (added)
-
tags/1.0.12/includes/function/util.php (added)
-
tags/1.0.12/includes/includes.php (added)
-
tags/1.0.12/readme.txt (added)
-
tags/1.0.12/src (added)
-
tags/1.0.12/src/db (added)
-
tags/1.0.12/src/db/fw-account.php (added)
-
tags/1.0.12/src/db/fw-error-log.php (added)
-
tags/1.0.12/src/db/fw-field-mapping.php (added)
-
tags/1.0.12/src/forms (added)
-
tags/1.0.12/src/forms/form-fields.php (added)
-
tags/1.0.12/src/forms/form-group-ids.php (added)
-
tags/1.0.12/src/forms/form-name.php (added)
-
tags/1.0.12/src/forms/forms.php (added)
-
tags/1.0.12/src/forms/id-mapping.php (added)
-
tags/1.0.12/src/forms/submit-action.php (added)
-
tags/1.0.12/src/product (added)
-
tags/1.0.12/src/product/action.php (added)
-
tags/1.0.12/src/product/fw-account-action.php (added)
-
tags/1.0.12/src/product/fw-crm.php (added)
-
tags/1.0.12/src/product/fw-errorlog-action.php (added)
-
tags/1.0.12/src/product/fw-settings-action.php (added)
-
tags/1.0.12/src/product/fw-setup-action.php (added)
-
tags/1.0.12/uninstall.php (added)
-
trunk/assets/css/banner.css (modified) (1 diff)
-
trunk/assets/css/error-log.css (modified) (1 diff)
-
trunk/assets/css/other-plugins.css (added)
-
trunk/crm-integration-freshworks-any-form.php (modified) (2 diffs)
-
trunk/includes/admin/accounts-tab.php (modified) (2 diffs)
-
trunk/includes/admin/admin.php (modified) (2 diffs)
-
trunk/includes/admin/banner.php (modified) (1 diff)
-
trunk/includes/admin/other-plugins.php (added)
-
trunk/includes/admin/premium-tab.php (modified) (2 diffs)
-
trunk/includes/admin/setup-tab.php (modified) (2 diffs)
-
trunk/includes/extend/error-log.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/product/fw-account-action.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
crm-integration-freshworks-any-form/trunk/assets/css/banner.css
r3208186 r3427134 1 .integrazo_fwcrm_form-banner- container{2 margin: 10px auto;3 padding: 15px;4 background-color: #0073aad4;5 color: #fff;6 border-radius: 6px;7 font-family: Arial, sans-serif;8 max-width: 600px;9 box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);1 .integrazo_fwcrm_form-banner-wrap{ 2 max-width: 900px; 3 margin: 30px auto; 4 padding: 28px; 5 background: #f9fafc; 6 border: 1px solid #e3e7ef; 7 border-radius: 10px; 8 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 9 color: #222; 10 10 } 11 11 12 .integrazo_fwcrm_form-banner-header { 13 display: flex; 14 align-items: center; 15 justify-content: space-between; 16 flex-wrap: wrap; 12 /* HEADER */ 13 .integrazo_fwcrm_form-banner-head{ 14 text-align: center; 15 margin-bottom: 20px; 16 } 17 .integrazo_fwcrm_form-banner-title{ 18 font-size: 20px; 19 font-weight: 600; 20 display: block; 21 margin-bottom: 8px; 22 } 23 .integrazo_fwcrm_form-banner-offer{ 24 display: inline-block; 25 padding: 10px 16px; 26 border: 1px dashed #d9a1a1; 27 background: #fff5f5; 28 border-radius: 8px; 29 font-size: 13px; 30 margin-top: 10px; 31 } 32 .integrazo_fwcrm_form-banner-offer code{ 33 background: #ffe5e5; 34 padding: 3px 8px; 35 border-radius: 5px; 36 font-weight: 600; 37 color: #d60000; 17 38 } 18 39 19 .integrazo_fwcrm_form-banner-text { 20 flex: 1; 21 min-width: 150px; 40 /* PLAN AREA */ 41 .integrazo_fwcrm_form-banner-plan-box{ 42 display: flex; 43 gap: 18px; 44 flex-wrap: wrap; 45 margin-top: 22px; 46 } 47 .integrazo_fwcrm_form-banner-plan{ 48 flex: 1; 49 min-width: 280px; 50 padding: 18px; 51 border: 1px solid #d8dce3; 52 background: #fff; 53 border-radius: 10px; 54 transition: all .2s; 55 } 56 .integrazo_fwcrm_form-banner-plan:hover{ 57 border-color: #bfc9d8; 58 box-shadow: 0 3px 10px rgba(0,0,0,0.05); 59 } 60 .integrazo_fwcrm_form-banner-plan-title{ 61 font-size: 15px; 62 font-weight: 600; 63 display: block; 64 margin-bottom: 6px; 65 } 66 .integrazo_fwcrm_form-banner-price{ 67 font-size: 18px; 68 font-weight: 700; 69 margin: 8px 0 12px; 70 } 71 .integrazo_fwcrm_form-banner-price del{ 72 font-size: 12px; 73 color: #999; 22 74 } 23 75 24 .integrazo_fwcrm_form-banner-title { 25 margin: 0 0 8px; 26 font-size: 16px; 27 font-weight: bold; 28 color: #fff; 76 /* FEATURES */ 77 .integrazo_fwcrm_form-banner-features{ 78 list-style-type: disc; 79 padding-left: 18px; 80 font-size: 14px; 81 line-height: 1.55; 82 } 83 .integrazo_fwcrm_form-banner-features li{ 84 margin-bottom: 6px; 85 } 86 .integrazo_fwcrm_form-banner-features .disabled{ 87 opacity: 0.55; 88 text-decoration: line-through; 89 list-style-type: circle; 29 90 } 30 91 31 .integrazo_fwcrm_form-banner-description { 32 margin: 0; 33 font-size: 12px; 34 line-height: 1.4; 35 color: #f1f1f1; 92 /* BUTTON */ 93 .integrazo_fwcrm_form-banner-cta{ 94 text-align: center; 95 margin-top: 25px; 36 96 } 37 97 38 .integrazo_fwcrm_form-banner-feature-list { 39 margin-top: 12px; 40 display: grid; 41 grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 42 gap: 8px; 43 font-size: 12px; 44 line-height: 1.4; 45 color: #f1f1f1; 98 .integrazo_fwcrm_form-banner-btn{ 99 background: #2a3cff; 100 color: #fff !important; 101 padding: 10px 22px; 102 border-radius: 8px; 103 font-size: 14px; 104 font-weight: 600; 105 text-decoration: none !important; 106 display: inline-block; 107 cursor: pointer; 46 108 } 47 109 48 .integrazo_fwcrm_form-banner-buttons-container { 49 margin-top: 15px; 50 display: flex; 51 justify-content: flex-end; 52 gap: 8px; 53 flex-wrap: wrap; 110 /* disable hover style */ 111 .integrazo_fwcrm_form-banner-btn:hover{ 112 background: #2a3cff !important; 113 color: #fff !important; 114 text-decoration: none !important; 115 box-shadow: none !important; 116 opacity: 1 !important; 54 117 } 55 56 .integrazo_fwcrm_form-banner-button {57 padding: 8px 15px;58 font-size: 12px;59 font-weight: bold;60 text-decoration: none;61 border-radius: 4px;62 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);63 transition: background-color 0.3s ease;64 }65 66 .integrazo_fwcrm_form-banner-trial-button {67 background-color: #ffba00;68 color: #333;69 }70 71 .integrazo_fwcrm_form-banner-trial-button:hover {72 background-color: #ffa500;73 }74 75 .integrazo_fwcrm_form-banner-upgrade-button {76 background-color: #ffffff;77 color: #333;78 }79 80 .integrazo_fwcrm_form-banner-upgrade-button:hover {81 background-color: #f0f0f0;82 } -
crm-integration-freshworks-any-form/trunk/assets/css/error-log.css
r3208186 r3427134 64 64 font-weight: bold; 65 65 } 66 #sno,#status_icon 67 { 68 width: 3.2em !important; 69 } 70 71 .integrazo_fwcrm_form-log-tick { 72 background-image: url('../img/tick.png'); /* Path relative to your CSS file */ 73 background-size: contain; 74 /* background-repeat: no-repeat; 75 background-position: center; */ 76 width: 15px; /* Set the desired width */ 77 height: 15px; /* Set the desired height */ 78 /* display: inline-block; */ 79 margin: 0 auto; /* Center the image inside the div if needed */ 80 border: 1.5px solid green; 81 border-radius: 9px; 82 } 83 .integrazo_fwcrm_form-log-close { 84 background-image: url('../img/close.png'); /* Path relative to your CSS file */ 85 background-size: contain; 86 /* background-repeat: no-repeat; 87 background-position: center; */ 88 width: 15px; /* Set the desired width */ 89 height: 15px; /* Set the desired height */ 90 /* display: inline-block; */ 91 margin: 0 auto; /* Center the image inside the div if needed */ 92 border: 1.5px solid red; 93 border-radius: 9px; 94 } -
crm-integration-freshworks-any-form/trunk/crm-integration-freshworks-any-form.php
r3414004 r3427134 5 5 * Plugin URI: https://integrazo.com/products/freshworks-crm-integration-with-any-form 6 6 * Description: Connect Contact Form 7, WPForms, Elementor Forms, Gravity Forms, and Formidable Forms submissions with Freshsales CRM. 7 * Version: 1.0.1 17 * Version: 1.0.12 8 8 * Author: Integrazo 9 9 * Author URI: https://integrazo.com/ … … 18 18 19 19 // Define plugin constants. 20 define('INTEGRAZO_FWCRM_FORM_VERSION', '1.0.1 1');20 define('INTEGRAZO_FWCRM_FORM_VERSION', '1.0.12'); 21 21 define('INTEGRAZO_FWCRM_FORM_PLUGIN_DIR', plugin_dir_path(__FILE__)); 22 22 define('INTEGRAZO_FWCRM_FORM_PLUGIN_URL', plugin_dir_url(__FILE__)); -
crm-integration-freshworks-any-form/trunk/includes/admin/accounts-tab.php
r3208186 r3427134 9 9 <span class="integrazo_fwcrm_form-help-icon">?</span> 10 10 <div class="integrazo_fwcrm_form-help-tooltip"> 11 <p> Effortlessly connect and manage your Freshworks CRM accounts here.</p>11 <p>Connect and manage your Freshworks CRM accounts from this page.</p> 12 12 </div> 13 13 </div> 14 15 <?php if ( $integrazo_fwcrm_form_accountDBInstance->get_total_accounts() == 0 ) : ?> 16 17 <div class="notice notice-error"> 18 <p> 19 <?php 20 echo wp_kses( 21 __('Start by clicking <b>Add Account</b>. After connecting your Freshworks account, continue to the Setup tab to create integrations.', 'crm-integration-freshworks-any-form'), 22 array( 'b' => array() ) 23 ); 24 ?> 25 </p> 26 </div> 27 28 <?php endif; ?> 29 14 30 <?php 15 31 $message = get_transient('integrazo_fwcrm_form_account_message'); … … 35 51 $accounts_table->display(); // Display account table 36 52 37 include "banner.php"; 53 if (!$session) { 54 include "other-plugins.php"; 55 } 38 56 39 57 ?> -
crm-integration-freshworks-any-form/trunk/includes/admin/admin.php
r3367602 r3427134 38 38 // Define assets for CSS and JS with busting versioning. 39 39 $assets = [ 40 'css' => ['home', 'auth', 'setup-fm', 'premium', 'settings', 'help', 'banner', 'error-log', 'options' ],40 'css' => ['home', 'auth', 'setup-fm', 'premium', 'settings', 'help', 'banner', 'error-log', 'options','other-plugins'], 41 41 'js' => ['home', 'common', 'setup-fm', 'help', 'error-log', 'review', 'options'] 42 42 ]; … … 93 93 'accounts' => __('Accounts', 'crm-integration-freshworks-any-form'), 94 94 'setup' => __('Setup', 'crm-integration-freshworks-any-form'), 95 'errorlog' => __(' Error Log', 'crm-integration-freshworks-any-form'),95 'errorlog' => __('Logs', 'crm-integration-freshworks-any-form'), 96 96 'settings' => __('Settings', 'crm-integration-freshworks-any-form'), 97 97 ]; -
crm-integration-freshworks-any-form/trunk/includes/admin/banner.php
r3213111 r3427134 1 1 <?php 2 if (!$session) { 2 // Exit if accessed directly 3 if (!defined('ABSPATH')) { 4 exit; 5 } 3 6 ?> 4 <div class="integrazo_fwcrm_form-banner-container">5 <div class="integrazo_fwcrm_form-banner-header">6 <div class="integrazo_fwcrm_form-banner-text">7 <h3 class="integrazo_fwcrm_form-banner-title">Upgrade to Premium!</h3>8 <p class="integrazo_fwcrm_form-banner-description">9 Upgrade now to access advanced features and take your experience to the next level!10 </p>11 </div>12 </div>13 <div class="integrazo_fwcrm_form-banner-feature-list">14 <div>✅ Integrate Unlimited Forms</div>15 <div>✅ Support for File Attachments</div>16 <div>✅ Error Log Resync</div>17 <div>✅ Unlock Custom Fields</div>18 <div>✅ Unlock Premium Fields</div>19 <div>✅ ...and much more!</div>20 </div>21 <div class="integrazo_fwcrm_form-banner-buttons-container">22 <a href="<?php echo esc_url("https://integrazo.com/products/freshworks-crm-integration-with-any-form?utm_source=plugin&utm_medium=upgrade_button&utm_campaign=freshworks_integration"); ?>" class="integrazo_fwcrm_form-banner-button integrazo_fwcrm_form-banner-upgrade-button" target="_blank" rel="noopener noreferrer">23 Upgrade Now24 </a>25 </div>26 7 8 <div class="integrazo_fwcrm_form-banner-wrap"> 9 10 <div class="integrazo_fwcrm_form-banner-head"> 11 <span class="integrazo_fwcrm_form-banner-title">Upgrade to Premium</span> 12 <div class="integrazo_fwcrm_form-banner-offer"> 13 Use coupon code <code>NEWYEAR2026</code> to get <b>61% OFF</b> — Save <b>$30</b> instantly! 14 </div> 15 </div> 16 17 <div class="integrazo_fwcrm_form-banner-plan-box"> 18 19 <!-- Free --> 20 <div class="integrazo_fwcrm_form-banner-plan"> 21 <span class="integrazo_fwcrm_form-banner-plan-title">Free Version</span> 22 <div class="integrazo_fwcrm_form-banner-price">$0</div> 23 24 <ul class="integrazo_fwcrm_form-banner-features"> 25 <li>Connect limited integrations</li> 26 <li>Basic field mapping</li> 27 <li class="disabled">Premium fields support</li> 28 <li class="disabled">Custom fields mapping</li> 29 <li class="disabled">Error log resync</li> 30 <li class="disabled">Priority support</li> 31 </ul> 27 32 </div> 28 33 29 <?php 30 } 31 ?> 34 <!-- Premium --> 35 <div class="integrazo_fwcrm_form-banner-plan" style="border: 2px solid #2a3cff;"> 36 <span class="integrazo_fwcrm_form-banner-plan-title">Premium Version</span> 37 38 <div class="integrazo_fwcrm_form-banner-price"> 39 <del>$49</del> $19 40 </div> 41 42 <span style="font-size: 13px; color: #0a8f0a; font-weight: 600;"> 43 🎉 You save <b>$30</b> right now (61% OFF) 44 </span> 45 46 <ul class="integrazo_fwcrm_form-banner-features" style="margin-top: 10px;"> 47 <li>Connect unlimited integrations</li> 48 <li>Advanced field mapping</li> 49 <li>Premium fields support</li> 50 <li>Custom fields mapping</li> 51 <li>Error log resync</li> 52 <li>Priority email support</li> 53 </ul> 54 </div> 55 56 </div> 57 58 <div class="integrazo_fwcrm_form-banner-cta"> 59 <a href="https://integrazo.com/products/freshworks-crm-integration-with-any-form" 60 target="_blank" 61 class="integrazo_fwcrm_form-banner-btn"> 62 Purchase Now & Save $30 63 </a> 64 <div style="margin-top: 8px; font-size: 13px; color: #666;"> 65 Limited time offer — Grab your 61% discount today! 66 </div> 67 </div> 68 69 </div> -
crm-integration-freshworks-any-form/trunk/includes/admin/premium-tab.php
r3213111 r3427134 10 10 <p>The free version offers basic features to get started, but upgrading to premium unlocks advanced tools and unlimited access.</p> 11 11 </div> 12 12 13 <div style="text-align: center;"> 14 <a href="https://integrazo.com/products/freshworks-crm-integration-with-any-form?utm_source=plugin&utm_medium=go_premium_button&utm_campaign=freshworks_integration" target="_blank"> 15 <button class="integrazo_fwcrm_form-go-premium-button">Upgrade to Premium</button> 16 </a> 17 </div> 18 <br> 13 19 <table class="integrazo_fwcrm_form-plan-comparison-table-wrapper"> 14 20 <thead class="integrazo_fwcrm_form-plan-table-header-container"> … … 236 242 </tbody> 237 243 </table> 238 239 240 241 <br>242 <div style="text-align: center;">243 <a href="https://integrazo.com/products/freshworks-crm-integration-with-any-form?utm_source=plugin&utm_medium=go_premium_button&utm_campaign=freshworks_integration" target="_blank">244 <button class="integrazo_fwcrm_form-go-premium-button">Upgrade to Premium</button>245 </a>246 </div>247 248 244 </div> 249 245 </div> -
crm-integration-freshworks-any-form/trunk/includes/admin/setup-tab.php
r3208186 r3427134 10 10 <div class="integrazo_fwcrm_form-help-tooltip"> 11 11 <p> 12 <?php esc_html_e(' Effortlessly connect and manage integrations with Freshworks CRM here.', 'crm-integration-freshworks-any-form'); ?>12 <?php esc_html_e('Connect and manage integrations with Freshworks CRM from this page.', 'crm-integration-freshworks-any-form'); ?> 13 13 </p> 14 </div> 14 </div> 15 15 </div> 16 16 <?php … … 34 34 $banner_file = plugin_dir_path(__FILE__) . "banner.php"; 35 35 if (file_exists($banner_file)) { 36 include $banner_file; 36 if (!$session) { 37 include $banner_file; 38 } 37 39 } 38 40 ?> -
crm-integration-freshworks-any-form/trunk/includes/extend/error-log.php
r3367602 r3427134 26 26 $columns = [ 27 27 'cb' => '<input type="checkbox" />', // Checkbox column for bulk actions 28 'status_icon' => '', 28 29 'sno' => __('S.No', 'crm-integration-freshworks-any-form'), 29 30 'integration_name' => __('Integration Name', 'crm-integration-freshworks-any-form'), … … 141 142 ); 142 143 } 143 144 protected function column_status_icon($item) 145 { 146 return '<div class="integrazo_fwcrm_form-log-close"></div>'; 147 } 144 148 protected function column_sno($item) 145 149 { -
crm-integration-freshworks-any-form/trunk/readme.txt
r3414004 r3427134 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.0.1 17 Stable tag: 1.0.12 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 197 197 == Changelog == 198 198 199 = 1.0.12 = 200 * Changed: Replaced transient-based account authentication storage with WordPress options for improved reliability. 201 * Improved: Account authentication flow stability during Zoho OAuth redirects. 202 * Improved: Better handling of authentication errors and session recovery. 203 * Improved: Data sanitization and validation in the Accounts and Setup pages. 204 * Fixed: Edge cases where account data could be lost during browser refresh or delayed redirects. 205 199 206 = 1.0.11 = 200 207 * Checked: Plugin tested and confirmed compatible with WordPress 6.9 -
crm-integration-freshworks-any-form/trunk/src/product/fw-account-action.php
r3208186 r3427134 48 48 $integrazo_fwcrm_form_accountDBInstance = new integrazo_fwcrm_form_Account_Table(); 49 49 50 // if ($account_id) { 51 // $result = $integrazo_fwcrm_form_accountDBInstance->update_account($account_id, $account_name, $instance_url, $api_key); 52 // $message = $result ? __('Account updated successfully!', 'crm-integration-freshworks-any-form') : __('Failed to save account details. Please try again.', 'crm-integration-freshworks-any-form'); 53 // } else { 54 // $result = $integrazo_fwcrm_form_accountDBInstance->insert_account($account_name, $instance_url, $api_key); 55 // $message = $result ? __('Account added successfully!', 'crm-integration-freshworks-any-form') : __('Failed to save account details. Please try again.', 'crm-integration-freshworks-any-form'); 56 // } 50 57 if ($account_id) { 51 $result = $integrazo_fwcrm_form_accountDBInstance->update_account($account_id, $account_name, $instance_url, $api_key);52 $ message = $result ? __('Account updated successfully!', 'crm-integration-freshworks-any-form') : __('Failed to save account details. Please try again.', 'crm-integration-freshworks-any-form');58 set_transient('integrazo_fwcrm_form_account_message', "Account updated successfully.", 300); 59 $integrazo_fwcrm_form_accountDBInstance->update_account($account_id, $account_name, $instance_url, $api_key); 53 60 } else { 54 $result = $integrazo_fwcrm_form_accountDBInstance->insert_account($account_name, $instance_url, $api_key); 55 $message = $result ? __('Account added successfully!', 'crm-integration-freshworks-any-form') : __('Failed to save account details. Please try again.', 'crm-integration-freshworks-any-form'); 61 62 $current_count = $integrazo_fwcrm_form_accountDBInstance->get_total_accounts(); 63 64 // Insert new account 65 $account_id = $integrazo_fwcrm_form_accountDBInstance->insert_account($account_name, $instance_url, $api_key); 66 67 // If this is the first account (count was 0 before insert) 68 if ( $current_count == 0 ) { 69 set_transient( 70 'integrazo_fwcrm_form_account_message', 71 "Account added successfully. Next, go to the Setup tab and start your integration.", 72 300 73 ); 74 } else { 75 set_transient('integrazo_fwcrm_form_account_message', "Account added successfully.", 300); 76 } 56 77 } 57 58 if ($result) { 59 set_transient('integrazo_fwcrm_form_account_message', $message, 300); 78 // if ($result) { 79 // set_transient('integrazo_fwcrm_form_account_message', $message, 300); 60 80 delete_transient('integrazo_fwcrm_form_auth_data'); 61 81 wp_safe_redirect($redirect_url); 62 82 exit; 63 }83 // } 64 84 } else { 65 85 if (isset($response['error']) && !empty($response['error'])) {
Note: See TracChangeset
for help on using the changeset viewer.