Plugin Directory

Changeset 3427118


Ignore:
Timestamp:
12/25/2025 06:30:18 AM (3 weeks ago)
Author:
plugcrux
Message:

Updated to version 1.0.9: OAuth option storage, UI fixes and CSS updates.

Location:
integrate-with-zoho-desk
Files:
83 added
8 edited

Legend:

Unmodified
Added
Removed
  • integrate-with-zoho-desk/trunk/assets/css/banner.css

    r3277037 r3427118  
    1 .iafwzdesk-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.iafwzdesk-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;
    1010}
    1111
    12 .iafwzdesk-banner-header {
    13     display: flex;
    14     align-items: center;
    15     justify-content: space-between;
    16     flex-wrap: wrap;
     12/* HEADER */
     13.iafwzdesk-banner-head{
     14  text-align: center;
     15  margin-bottom: 20px;
     16}
     17.iafwzdesk-banner-title{
     18  font-size: 20px;
     19  font-weight: 600;
     20  display: block;
     21  margin-bottom: 8px;
     22}
     23.iafwzdesk-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.iafwzdesk-banner-offer code{
     33  background: #ffe5e5;
     34  padding: 3px 8px;
     35  border-radius: 5px;
     36  font-weight: 600;
     37  color: #d60000;
    1738}
    1839
    19 .iafwzdesk-banner-text {
    20     flex: 1;
    21     min-width: 150px;
     40/* PLAN AREA */
     41.iafwzdesk-banner-plan-box{
     42  display: flex;
     43  gap: 18px;
     44  flex-wrap: wrap;
     45  margin-top: 22px;
     46}
     47.iafwzdesk-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.iafwzdesk-banner-plan:hover{
     57  border-color: #bfc9d8;
     58  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
     59}
     60.iafwzdesk-banner-plan-title{
     61  font-size: 15px;
     62  font-weight: 600;
     63  display: block;
     64  margin-bottom: 6px;
     65}
     66.iafwzdesk-banner-price{
     67  font-size: 18px;
     68  font-weight: 700;
     69  margin: 8px 0 12px;
     70}
     71.iafwzdesk-banner-price del{
     72  font-size: 12px;
     73  color: #999;
    2274}
    2375
    24 .iafwzdesk-banner-title {
    25     margin: 0 0 8px;
    26     font-size: 16px;
    27     font-weight: bold;
    28     color: #fff;
     76/* FEATURES */
     77.iafwzdesk-banner-features{
     78  list-style-type: disc;
     79  padding-left: 18px;
     80  font-size: 14px;
     81  line-height: 1.55;
     82}
     83.iafwzdesk-banner-features li{
     84  margin-bottom: 6px;
     85}
     86.iafwzdesk-banner-features .disabled{
     87  opacity: 0.55;
     88  text-decoration: line-through;
     89  list-style-type: circle;
    2990}
    3091
    31 .iafwzdesk-banner-description {
    32     margin: 0;
    33     font-size: 12px;
    34     line-height: 1.4;
    35     color: #f1f1f1;
     92/* BUTTON */
     93.iafwzdesk-banner-cta{
     94  text-align: center;
     95  margin-top: 25px;
    3696}
    3797
    38 .iafwzdesk-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.iafwzdesk-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;
    46108}
    47109
    48 .iafwzdesk-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.iafwzdesk-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;
    54117}
    55 
    56 .iafwzdesk-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 .iafwzdesk-banner-trial-button {
    67     background-color: #ffba00;
    68     color: #333;
    69 }
    70 
    71 .iafwzdesk-banner-trial-button:hover {
    72     background-color: #ffa500;
    73 }
    74 
    75 .iafwzdesk-banner-upgrade-button {
    76     background-color: #ffffff;
    77     color: #333;
    78 }
    79 
    80 .iafwzdesk-banner-upgrade-button:hover {
    81     background-color: #f0f0f0;
    82 }
  • integrate-with-zoho-desk/trunk/includes/admin/accounts-tab.php

    r3277037 r3427118  
    1616        </div>
    1717    </div>
    18 
     18<?php if ( $iafwzdesk_accountDBInstance->get_total_accounts() == 0 ) : ?>
     19
     20<div class="notice notice-error">
     21    <p>
     22        <?php
     23        echo wp_kses(
     24            __('Start by clicking <b>Add Account</b>. After connecting your Zoho account, continue to the Setup tab to create integrations.', 'integrate-with-zoho-desk'),
     25            array( 'b' => array() )
     26        );
     27        ?>
     28    </p>
     29</div>
     30
     31<?php endif; ?>
    1932    <?php
    2033    $message = get_transient('iafwzdesk_account_message');
     
    3447    $accounts_table->display();       // Display account table
    3548    if (!$session) {
    36         include "banner.php";
     49        include "other-plugins.php";
    3750    }
    3851
     
    6578
    6679// Get authentication data from transient
    67 $auth_data = get_transient('iafwzdesk_account_data');
     80$auth_data = get_option('iafwzdesk_account_data');
    6881if (!$account_id) {
    6982    $account_id = $auth_data['account_id'] ?? null;
     
    8194        $data_center = $auth_data['data_center'] ?? '';
    8295        $message = $auth_data['error_message'] ?? '';
    83         delete_transient('iafwzdesk_account_data');
     96       delete_option('iafwzdesk_account_data');
     97
    8498    } else {
    8599        // Fetch account details based on account ID
     
    94108    $data_center = $auth_data['data_center'] ?? '';
    95109    $message = $auth_data['error_message'] ?? '';
    96     delete_transient('iafwzdesk_account_data');
     110   delete_option('iafwzdesk_account_data');
     111
    97112} else {
    98113    // Default account name if no account ID or auth data is provided
  • integrate-with-zoho-desk/trunk/includes/admin/admin.php

    r3367574 r3427118  
    3838    // Define assets for CSS and JS with busting versioning.
    3939    $assets = [
    40         'css' => ['home', 'auth', 'setup-fm', 'setup-filter', 'premium', 'settings', 'ai-settings', 'help', 'banner', 'error-log'],
     40        'css' => ['home', 'auth', 'setup-fm', 'setup-filter', 'premium', 'settings', 'ai-settings', 'help', 'banner', 'error-log','other-plugins'],
    4141        'js' => ['home', 'common', 'setup-fm', 'setup-custom', 'setup-filter', 'ai-settings', 'help', 'error-log']
    4242    ];
  • integrate-with-zoho-desk/trunk/includes/admin/banner.php

    r3277037 r3427118  
    11<?php
     2// Exit if accessed directly
     3if (!defined('ABSPATH')) {
     4    exit;
     5}
    26?>
    3 <div class="iafwzdesk-banner-container">
    4     <div class="iafwzdesk-banner-header">
    5         <div class="iafwzdesk-banner-text">
    6             <h3 class="iafwzdesk-banner-title">Upgrade to Premium!</h3>
    7             <p class="iafwzdesk-banner-description">
    8                 Upgrade now to access advanced features and take your experience to the next level!
    9             </p>
    10         </div>
     7
     8<div class="iafwzdesk-banner-wrap">
     9
     10  <div class="iafwzdesk-banner-head">
     11    <span class="iafwzdesk-banner-title">Upgrade to Premium</span>
     12    <div class="iafwzdesk-banner-offer">
     13      Use coupon code <code>NEWYEAR2026</code> to get <b>61% OFF</b> — Save <b>$30</b> instantly!
    1114    </div>
    12     <div class="iafwzdesk-banner-feature-list">
    13         <div>✅ Integrate Unlimited Accounts</div>
    14         <div>✅ Integrate Unlimited Forms</div>
    15         <div>✅ Unlock Custom Fields</div>
    16         <div>✅ Unlock Premium Fields</div>
    17         <div>✅ Error Log Resync</div>
    18         <div>✅ ...and much more!</div>
    19     </div>
    20     <div class="iafwzdesk-banner-buttons-container">
    21         <a href="<?php echo esc_url("https://integrazo.com/products/integrate-with-zoho-desk"); ?>" class="iafwzdesk-banner-button iafwzdesk-banner-upgrade-button" target="_blank" rel="noopener noreferrer">
    22             Upgrade Now
    23         </a>
     15  </div>
    2416
     17  <div class="iafwzdesk-banner-plan-box">
     18
     19    <!-- Free -->
     20    <div class="iafwzdesk-banner-plan">
     21      <span class="iafwzdesk-banner-plan-title">Free Version</span>
     22      <div class="iafwzdesk-banner-price">$0</div>
     23
     24      <ul class="iafwzdesk-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>
    2532    </div>
    2633
     34    <!-- Premium -->
     35    <div class="iafwzdesk-banner-plan" style="border: 2px solid #2a3cff;">
     36      <span class="iafwzdesk-banner-plan-title">Premium Version</span>
     37
     38      <div class="iafwzdesk-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="iafwzdesk-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="iafwzdesk-banner-cta">
     59    <a href="https://integrazo.com/products/integrate-with-zoho-desk"
     60       target="_blank"
     61       class="iafwzdesk-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
    2769</div>
  • integrate-with-zoho-desk/trunk/includes/admin/premium-tab.php

    r3277037 r3427118  
    1010            <p>The free version offers basic features to get started, but upgrading to premium unlocks advanced tools and unlimited access.</p>
    1111        </div>
    12 
     12   
     13        <div style="text-align: center;">
     14            <a href="https://integrazo.com/products/integrate-with-zoho-desk" target="_blank">
     15                <button class="iafwzdesk-go-premium-button">Upgrade to Premium</button>
     16            </a>
     17        </div>
     18         <br>
    1319        <table class="iafwzdesk-plan-comparison-table-wrapper">
    1420            <thead class="iafwzdesk-plan-table-header-container">
     
    208214
    209215
    210         <br>
    211         <div style="text-align: center;">
    212             <a href="https://integrazo.com/products/integrate-with-zoho-desk" target="_blank">
    213                 <button class="iafwzdesk-go-premium-button">Upgrade to Premium</button>
    214             </a>
    215         </div>
     216       
    216217
    217218    </div>
  • integrate-with-zoho-desk/trunk/integrate-with-zoho-desk.php

    r3414034 r3427118  
    55 * Plugin URI: https://integrazo.com/products/integrate-with-zoho-desk
    66 * Description: Connect Contact Form 7, WPForms, Elementor Forms, Gravity Forms, and Formidable Forms submissions with Zoho Desk.
    7  * Version: 1.0.8
     7 * Version: 1.0.9
    88 * Author: Integrazo
    99 * Author URI: https://integrazo.com/
  • integrate-with-zoho-desk/trunk/readme.txt

    r3414034 r3427118  
    1 === Integration for Zoho Desk ===
     1=== Integration for Zoho Desk - Contact Form 7, WPForms, Elementor, Gravity Forms and Formidable ===
    22Contributors: plugcrux, integrazo, padmadev
    33Tags: zoho desk integration, zoho desk, contact form 7, wpforms, elementor forms
     
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.0.8
     7Stable tag: 1.0.9
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    211211== Changelog ==
    212212
     213= 1.0.9 =
     214* Changed: Replaced transient-based account authentication storage with WordPress options for improved reliability.
     215* Improved: Account authentication flow stability during Zoho OAuth redirects.
     216* Improved: Better handling of authentication errors and session recovery.
     217* Improved: Data sanitization and validation in the Accounts and Setup pages.
     218* Fixed: Edge cases where account data could be lost during browser refresh or delayed redirects.
     219
    213220= 1.0.8 =
    214221* Checked: Plugin tested and confirmed compatible with WordPress 6.9
  • integrate-with-zoho-desk/trunk/src/product/account-action.php

    r3349490 r3427118  
    5454        'account_id'   => $account_id,
    5555    ];
    56     set_transient('iafwzdesk_account_data', $auth_data, 300); // Store for 5 minutes
     56    update_option('iafwzdesk_account_data', $auth_data);
    5757
    5858    // Construct the Zoho OAuth URL
     
    8181    if (isset($_GET['page'], $_GET['nonce']) && $_GET['page'] === 'integrate-with-zoho-desk') {
    8282        // Retrieve and sanitize transient values
    83         $auth_data = get_transient('iafwzdesk_account_data') ?: [];
     83        $auth_data = get_option('iafwzdesk_account_data') ?: [];
    8484
    8585        // Handle session expiration or missing data
     
    124124            $iafwzdesk_accountDBInstance->update_account($account_id, $auth_data['account_name'], $auth_data['data_center'], $refresh_token, $access_token, $org_id);
    125125        } else {
    126             set_transient('iafwzdesk_account_message', "Account added successfully.", 300);
     126
     127            $current_count = $iafwzdesk_accountDBInstance->get_total_accounts();
     128
     129            // Insert new account
    127130            $account_id = $iafwzdesk_accountDBInstance->insert_account($auth_data['account_name'], $auth_data['data_center'], $refresh_token, $access_token, $org_id);
    128         }
    129         //
    130 
     131
     132            // If this is the first account (count was 0 before insert)
     133            if ( $current_count == 0 ) {
     134                set_transient(
     135                    'iafwzdesk_account_message',
     136                    "Account added successfully. Next, go to the Setup tab and start your integration.",
     137                    300
     138                );
     139            } else {
     140                set_transient('iafwzdesk_account_message', "Account added successfully.", 300);
     141            }
     142        }
    131143        // Delete auth data transient and redirect
    132         delete_transient('iafwzdesk_account_data');
     144        delete_option('iafwzdesk_account_data');
     145
    133146        wp_redirect($redirect_url);
    134147        exit;
     
    139152{
    140153    // Retrieve the existing auth data and merge the new error message
    141     $auth_data = get_transient('iafwzdesk_account_data') ?: [];
     154    $auth_data = get_option('iafwzdesk_account_data') ?: [];
     155
    142156    $auth_data['error_message'] = $message; // Add error message to existing data
    143157
    144158    // Set the transient with the full auth data, including error message
    145     set_transient('iafwzdesk_account_data', $auth_data, 300);
     159    update_option('iafwzdesk_account_data', $auth_data);
    146160    // Redirect with error status
    147161    wp_redirect(remove_query_arg(['code', 'nonce']));
Note: See TracChangeset for help on using the changeset viewer.