Plugin Directory

Changeset 3453902


Ignore:
Timestamp:
02/04/2026 03:28:19 PM (2 weeks ago)
Author:
shift8
Message:

Remove debug code, resolve fatal error

Location:
shift8-integration-for-gravity-forms-and-sap-business-one/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • shift8-integration-for-gravity-forms-and-sap-business-one/trunk/readme.txt

    r3448906 r3453902  
    55* Requires at least: 5.0
    66* Tested up to: 6.8
    7 * Stable tag: 1.3.2
     7* Stable tag: 1.3.3
    88* Requires PHP: 7.4
    99* License: GPLv3
     
    104104
    105105== Changelog ==
     106
     107= 1.3.3 =
     108* **FIX**: Fixed fatal error from undefined methods (removed orphaned debug handlers)
     109* **FIX**: Removed orphaned debug/test buttons from settings page
     110* **FIX**: Test Integration now correctly uses Business Partner Type and Code Prefix settings
     111* **FIX**: Improved entries list column display using field mapping for Name, Email, Country
     112* **STABILITY**: All 99 tests passing with 231 assertions
    106113
    107114= 1.3.2 =
  • shift8-integration-for-gravity-forms-and-sap-business-one/trunk/shift8-gravitysap.php

    r3449540 r3453902  
    44 * Plugin URI: https://github.com/stardothosting/shift8-gravitysap
    55 * Description: Integrates Gravity Forms with SAP Business One, automatically creating Business Partners from form submissions.
    6  * Version: 1.3.2
     6 * Version: 1.3.3
    77 * Author: Shift8 Web
    88 * Author URI: https://shift8web.ca
     
    2828
    2929// Plugin constants
    30 define('SHIFT8_GRAVITYSAP_VERSION', '1.3.2');
     30define('SHIFT8_GRAVITYSAP_VERSION', '1.3.3');
    3131define('SHIFT8_GRAVITYSAP_PLUGIN_FILE', __FILE__);
    3232define('SHIFT8_GRAVITYSAP_PLUGIN_DIR', plugin_dir_path(__FILE__));
     
    405405            } else {
    406406                GFCommon::add_error_message(esc_html__('Test failed: ', 'shift8-gravity-forms-sap-b1-integration') . esc_html($test_result['message']));
    407             }
    408         }
    409        
    410         // Handle field mapping test
    411         if (rgpost('test-field-mapping') && wp_verify_nonce(rgpost('gforms_save_form'), 'gforms_save_form')) {
    412             $test_result = $this->test_field_mapping($form);
    413            
    414             if ($test_result['success']) {
    415                 GFCommon::add_message(esc_html__('Field mapping test completed: ', 'shift8-gravity-forms-sap-b1-integration') . esc_html($test_result['message']));
    416             } else {
    417                 GFCommon::add_error_message(esc_html__('Field mapping test failed: ', 'shift8-gravity-forms-sap-b1-integration') . esc_html($test_result['message']));
    418             }
    419         }
    420        
    421         // Handle debug entry data
    422         if (rgpost('debug-entry-data') && wp_verify_nonce(rgpost('gforms_save_form'), 'gforms_save_form')) {
    423             $debug_result = $this->debug_entry_data($form);
    424             GFCommon::add_message('<pre>' . esc_html($debug_result) . '</pre>');
    425         }
    426        
    427         // Handle test SAP submission
    428         if (rgpost('test-sap-submission') && wp_verify_nonce(rgpost('gforms_save_form'), 'gforms_save_form')) {
    429             $test_result = $this->test_sap_submission($form);
    430             if ($test_result['success']) {
    431                 GFCommon::add_message('✅ SAP submission test successful: ' . esc_html($test_result['message']));
    432             } else {
    433                 GFCommon::add_error_message('❌ SAP submission test failed: ' . esc_html($test_result['message']));
    434407            }
    435408        }
     
    13321305        <hr style="margin: 30px 0;" />
    13331306       
    1334         <!-- Field Mapping Test -->
    1335         <form method="post" id="test-field-mapping-form" style="margin-bottom: 20px;">
    1336             <?php wp_nonce_field('gforms_save_form', 'gforms_save_form') ?>
    1337             <input type="hidden" name="id" value="<?php echo esc_attr($form_id); ?>" />
    1338             <input type="hidden" name="subview" value="sap_integration" />
    1339            
    1340             <h3><?php esc_html_e('Test Field Mapping', 'shift8-gravity-forms-sap-b1-integration'); ?></h3>
    1341             <p><?php esc_html_e('Test the field mapping configuration with sample data to see which fields are mapped and which are missing.', 'shift8-gravity-forms-sap-b1-integration'); ?></p>
    1342            
    1343             <p class="submit">
    1344                 <input type="submit" name="test-field-mapping" value="<?php esc_attr_e('Test Field Mapping', 'shift8-gravity-forms-sap-b1-integration'); ?>" class="button-secondary" />
    1345             </p>
    1346         </form>
    1347        
    1348         <!-- Debug Entry Data -->
    1349         <form method="post" id="debug-entry-data-form" style="margin-bottom: 20px;">
    1350             <?php wp_nonce_field('gforms_save_form', 'gforms_save_form') ?>
    1351             <input type="hidden" name="id" value="<?php echo esc_attr($form_id); ?>" />
    1352             <input type="hidden" name="subview" value="sap_integration" />
    1353            
    1354             <h3><?php esc_html_e('Debug Entry Data', 'shift8-gravity-forms-sap-b1-integration'); ?></h3>
    1355             <p><?php esc_html_e('Show the raw entry data and field mapping to help debug why the Name field is blank.', 'shift8-gravity-forms-sap-b1-integration'); ?></p>
    1356            
    1357             <p class="submit">
    1358                 <input type="submit" name="debug-entry-data" value="<?php esc_attr_e('Debug Entry Data', 'shift8-gravity-forms-sap-b1-integration'); ?>" class="button-secondary" />
    1359             </p>
    1360         </form>
    1361        
    1362         <!-- Test SAP Submission -->
    1363         <form method="post" id="test-sap-submission-form" style="margin-bottom: 20px;">
    1364             <?php wp_nonce_field('gforms_save_form', 'gforms_save_form') ?>
    1365             <input type="hidden" name="id" value="<?php echo esc_attr($form_id); ?>" />
    1366             <input type="hidden" name="subview" value="sap_integration" />
    1367            
    1368             <h3><?php esc_html_e('Test SAP Submission', 'shift8-gravity-forms-sap-b1-integration'); ?></h3>
    1369             <p><?php esc_html_e('Test SAP submission with the most recent entry to see detailed error information.', 'shift8-gravity-forms-sap-b1-integration'); ?></p>
    1370            
    1371             <p class="submit">
    1372                 <input type="submit" name="test-sap-submission" value="<?php esc_attr_e('Test SAP Submission', 'shift8-gravity-forms-sap-b1-integration'); ?>" class="button-secondary" />
    1373             </p>
    1374         </form>
    1375        
    13761307        <!-- Numbering Series Test -->
    13771308        <form method="post" id="test-numbering-series-form" style="margin-bottom: 20px;">
     
    29472878    private function map_test_values_to_business_partner($settings, $test_values) {
    29482879        $card_type = rgar($settings, 'card_type', 'cCustomer');
     2880        $card_code_prefix = rgar($settings, 'card_code_prefix', '');
    29492881       
    29502882        $business_partner = array('CardType' => $card_type);
     2883       
     2884        // Add the prefix if specified (same as real form submission)
     2885        if (!empty($card_code_prefix)) {
     2886            $business_partner['CardCodePrefix'] = $card_code_prefix;
     2887        }
    29512888       
    29522889        foreach ($test_values as $sap_field => $test_value) {
Note: See TracChangeset for help on using the changeset viewer.