Changeset 3453902
- Timestamp:
- 02/04/2026 03:28:19 PM (2 weeks ago)
- Location:
- shift8-integration-for-gravity-forms-and-sap-business-one/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
shift8-gravitysap.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shift8-integration-for-gravity-forms-and-sap-business-one/trunk/readme.txt
r3448906 r3453902 5 5 * Requires at least: 5.0 6 6 * Tested up to: 6.8 7 * Stable tag: 1.3. 27 * Stable tag: 1.3.3 8 8 * Requires PHP: 7.4 9 9 * License: GPLv3 … … 104 104 105 105 == 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 106 113 107 114 = 1.3.2 = -
shift8-integration-for-gravity-forms-and-sap-business-one/trunk/shift8-gravitysap.php
r3449540 r3453902 4 4 * Plugin URI: https://github.com/stardothosting/shift8-gravitysap 5 5 * Description: Integrates Gravity Forms with SAP Business One, automatically creating Business Partners from form submissions. 6 * Version: 1.3. 26 * Version: 1.3.3 7 7 * Author: Shift8 Web 8 8 * Author URI: https://shift8web.ca … … 28 28 29 29 // Plugin constants 30 define('SHIFT8_GRAVITYSAP_VERSION', '1.3. 2');30 define('SHIFT8_GRAVITYSAP_VERSION', '1.3.3'); 31 31 define('SHIFT8_GRAVITYSAP_PLUGIN_FILE', __FILE__); 32 32 define('SHIFT8_GRAVITYSAP_PLUGIN_DIR', plugin_dir_path(__FILE__)); … … 405 405 } else { 406 406 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 test411 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 data422 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 submission428 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']));434 407 } 435 408 } … … 1332 1305 <hr style="margin: 30px 0;" /> 1333 1306 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 1376 1307 <!-- Numbering Series Test --> 1377 1308 <form method="post" id="test-numbering-series-form" style="margin-bottom: 20px;"> … … 2947 2878 private function map_test_values_to_business_partner($settings, $test_values) { 2948 2879 $card_type = rgar($settings, 'card_type', 'cCustomer'); 2880 $card_code_prefix = rgar($settings, 'card_code_prefix', ''); 2949 2881 2950 2882 $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 } 2951 2888 2952 2889 foreach ($test_values as $sap_field => $test_value) {
Note: See TracChangeset
for help on using the changeset viewer.