Changeset 3378252
- Timestamp:
- 10/14/2025 02:42:54 PM (6 months ago)
- Location:
- formscrm
- Files:
-
- 2 added
- 14 edited
- 1 copied
-
tags/4.0.4 (copied) (copied from formscrm/trunk)
-
tags/4.0.4/blueprint.json (added)
-
tags/4.0.4/formscrm.php (modified) (2 diffs)
-
tags/4.0.4/includes/admin/class-admin-updater.php (modified) (4 diffs)
-
tags/4.0.4/includes/crm-library/class-crmlib-clientify.php (modified) (3 diffs)
-
tags/4.0.4/includes/formscrm-library/class-gravityforms-widget.php (modified) (2 diffs)
-
tags/4.0.4/includes/formscrm-library/class-gravityforms.php (modified) (4 diffs)
-
tags/4.0.4/includes/formscrm-library/helpers-functions.php (modified) (1 diff)
-
tags/4.0.4/readme.txt (modified) (3 diffs)
-
trunk/blueprint.json (added)
-
trunk/formscrm.php (modified) (2 diffs)
-
trunk/includes/admin/class-admin-updater.php (modified) (4 diffs)
-
trunk/includes/crm-library/class-crmlib-clientify.php (modified) (3 diffs)
-
trunk/includes/formscrm-library/class-gravityforms-widget.php (modified) (2 diffs)
-
trunk/includes/formscrm-library/class-gravityforms.php (modified) (4 diffs)
-
trunk/includes/formscrm-library/helpers-functions.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
formscrm/tags/4.0.4/formscrm.php
r3324829 r3378252 4 4 * Plugin URI: https://close.technology/wordpress-plugins/formscrm/ 5 5 * Description: Connects Forms with CRM, ERP and Email Marketing. 6 * Version: 4.0. 36 * Version: 4.0.4 7 7 * Author: CloseTechnology 8 8 * Author URI: https://close.technology … … 24 24 defined( 'ABSPATH' ) || die( 'No script kiddies please!' ); 25 25 26 define( 'FORMSCRM_VERSION', '4.0. 3' );26 define( 'FORMSCRM_VERSION', '4.0.4' ); 27 27 define( 'FORMSCRM_PLUGIN', __FILE__ ); 28 28 define( 'FORMSCRM_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); -
formscrm/tags/4.0.4/includes/admin/class-admin-updater.php
r3118314 r3378252 56 56 private $wc_am_software_version = ''; 57 57 58 public function __construct( $file, $product_id, $software_version, $plugin_or_theme, $api_url, $software_title = '', $text_domain = '' ) { 58 /** 59 * Constructor method for initializing the class. 60 * 61 * @param string $file The file path of the plugin or theme. 62 * @param string|int $product_id The product ID used for API requests. Can be a string (pre 2.0) or an integer (>= 2.0). 63 * @param string $software_version The version of the software. 64 * @param string $plugin_or_theme Specifies whether it is a plugin or theme. 65 * @param string $api_url The URL for the API endpoint. 66 * @param string $software_title (Optional) The title of the software. 67 * @param string $text_domain (Optional) The text domain for translation and localization. 68 * 69 * @return void 70 */ 71 public function __construct( $file, $product_id, $software_version, $plugin_or_theme, $api_url, $software_title = '', $text_domain = '' ) { 59 72 $this->no_product_id = empty( $product_id ); 60 73 $this->plugin_or_theme = esc_attr( strtolower( $plugin_or_theme ) ); … … 120 133 $this->wc_am_deactivation_tab_key = $this->data_key . '_deactivation'; 121 134 $this->wc_am_auto_update_key = $this->data_key . '_auto_update'; 122 $this->wc_am_settings_menu_title = $this->software_title . esc_html__( ' Activation', 'formscrm' ); 123 $this->wc_am_settings_title = $this->software_title . esc_html__( ' License Activation', 'formscrm' ); 135 /* translators: %s: software title */ 136 $this->wc_am_settings_menu_title = sprintf( esc_html__( '%s Activation', 'formscrm' ), $this->software_title ); 137 /* translators: %s: software title */ 138 $this->wc_am_settings_title = sprintf( esc_html__( '%s License Activation', 'formscrm' ), $this->software_title ); 124 139 $this->wc_am_menu_tab_activation_title = esc_html__( 'License Activation', 'formscrm' ); 125 140 $this->wc_am_menu_tab_deactivation_title = esc_html__( 'License Deactivation', 'formscrm' ); … … 272 287 if ( $plugin_data[ 'auto-update-forced' ] ) { 273 288 // Forced on. 274 $text = __( 'Auto-updates enabled' );289 $text = __( 'Auto-updates enabled', 'formscrm' ); 275 290 } else { 276 $text = __( 'Auto-updates disabled' );291 $text = __( 'Auto-updates disabled', 'formscrm' ); 277 292 } 278 293 … … 280 295 $time_class = ' hidden'; 281 296 } elseif ( in_array( $plugin_file, $auto_updates, true ) ) { 282 $text = __( 'Disable auto-updates' );297 $text = __( 'Disable auto-updates', 'formscrm' ); 283 298 $action = 'disable'; 284 299 $time_class = ''; 285 300 } else { 286 $text = __( 'Enable auto-updates' );301 $text = __( 'Enable auto-updates', 'formscrm' ); 287 302 $action = 'enable'; 288 303 $time_class = ' hidden'; -
formscrm/tags/4.0.4/includes/crm-library/class-crmlib-clientify.php
r3324829 r3378252 777 777 $deal = array(); 778 778 $deal_product_skus = ''; 779 $last_module = 'contact'; 779 780 780 781 $module = sanitize_title( $module ); … … 894 895 $this->request( 'deals/' . $result['data']['id'] . '/products/', $res_products['data'], $apikey, 'PUT' ); 895 896 } 897 $last_module = 'deal'; 896 898 } 897 899 } else { … … 904 906 ); 905 907 } 908 909 $response_result['module'] = $last_module; 906 910 return $response_result; 907 911 } -
formscrm/tags/4.0.4/includes/formscrm-library/class-gravityforms-widget.php
r3104373 r3378252 60 60 $html .= '<li>'; 61 61 $html .= sprintf( 62 // translators: %s is the name of the feed. 62 63 __( 'Feed: %s', 'formscrm' ), 63 64 isset( $feed['meta']['feedName'] ) ? $feed['meta']['feedName'] : $feed['id'], … … 77 78 $html .= '<li>'; 78 79 $html .= sprintf( 80 // translators: %s is the name of the feed. 79 81 __( 'Feed: %s', 'formscrm' ), 80 82 isset( $feed['meta']['feedName'] ) ? $feed['meta']['feedName'] : $feed['id'], -
formscrm/tags/4.0.4/includes/formscrm-library/class-gravityforms.php
r3290078 r3378252 279 279 'class' => 'medium', 280 280 'onchange' => 'jQuery(this).parents("form").submit();', 281 'choices' => 282 array_merge( 281 'choices' => array_merge( 283 282 array( 283 // translators: %s is the name of the CRM as defined in settings. 284 284 array( 285 285 'label' => sprintf( 286 // translators: %s is the name of the CRM as defined in settings. 286 287 __( 'Use default CRM defined in Settings: %s', 'formscrm' ), 287 288 ucfirst( $settings_crm ) 288 289 ), 289 290 'value' => 'no', 290 ), 291 ), 291 292 ), 292 293 formscrm_get_choices() … … 296 297 $this->get_crm_fields( false, $settings ), 297 298 $this->get_crm_feed_fields( $settings ), 299 array( 300 array( 301 'name' => 'fc_crm_webhook', 302 'label' => __( 'FormsCRM webhook', 'formscrm' ), 303 'type' => 'text', 304 'class' => 'medium', 305 'input_type' => 'url', 306 'placeholder' => __( 'https://your-webhook-url.com', 'formscrm' ), 307 'tooltip' => '<h6>' . __( 'FormsCRM webhook', 'formscrm' ) . '</h6>' . __( 'Enter a URL to send a webhook form data received from CRM.', 'formscrm' ), 308 ), 309 ) 298 310 ), 299 311 ), … … 576 588 } else { 577 589 $response_message = sprintf( 578 // translators: %1$s CRM name %2$s ID number of entry created. 579 __( 'Success creating %1$s Entry ID: %2$s', 'formscrm' ), 590 // translators: %1$s CRM name %2$s CRM type %3$s ID number of entry created. 591 __( 'Success creating %1$s (%2$s) Entry ID: %3$s', 'formscrm' ), 592 isset( $settings['fc_crm_name'] ) ? esc_html( $settings['fc_crm_name'] ) : '', 580 593 esc_html( $settings['fc_crm_type'] ), 581 594 $response_result['id'] … … 583 596 $this->add_note( $entry['id'], $response_message, 'success' ); 584 597 formscrm_debug_message( $response_result['id'] ); 598 formscrm_send_webhook( $settings, $response_result ); 585 599 gform_add_meta( $entry['id'], $settings['fc_crm_type'], $response_result['id'], $form['id'] ); 586 600 } -
formscrm/tags/4.0.4/includes/formscrm-library/helpers-functions.php
r2836306 r3378252 127 127 } 128 128 } 129 130 if ( ! function_exists( 'formscrm_send_webhook' ) ) { 131 /** 132 * Sends webhook 133 * 134 * @param string $settings Settings. 135 * @param array $response Response from CRM. 136 * @return void 137 */ 138 function formscrm_send_webhook( $settings, $response ) { 139 $webhook_url = isset( $settings['fc_crm_webhook'] ) ? $settings['fc_crm_webhook'] : ''; 140 if ( empty( $webhook_url ) ) { 141 return; 142 } 143 $module = isset( $response['module'] ) ? $response['module'] : ''; 144 $ids = isset( $response['id'] ) ? $response['id'] : ''; 145 $ids = explode( '|', $ids ); 146 $entry_id = end( $ids ); 147 148 $body = array( 149 'hook' => array( 150 'event' => $module . '.saved', 151 'target' => $webhook_url, 152 ), 153 'data' => array( 154 'id' => $entry_id, 155 ), 156 ); 157 $response = wp_remote_post( $webhook_url, array( 'body' => wp_json_encode( $body ) ) ); 158 return array( 159 'response' => $response, 160 'request' => $body, 161 ); 162 } 163 } -
formscrm/tags/4.0.4/readme.txt
r3324829 r3378252 5 5 Requires at least: 5.5 6 6 Tested up to: 6.8 7 Stable tag: 4.0. 38 Version: 4.0. 37 Stable tag: 4.0.4 8 Version: 4.0.4 9 9 License: GPL2 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 74 74 Field that applies the autoassignment to the contact. You can add a string with the list of usernames (property emails) separated by comma (,) to apply the autoassignment. 75 75 76 **Webhook in GravityForms** 77 You can add a new field that fits with the Webhook in GravityForms. This field is optional, and you need to add the webhook url. The plugin will send the form data received from CRM to the webhook url. 78 76 79 == Installation == 77 80 … … 83 86 84 87 == Changelog == 88 89 = 4.0.4 = 90 * Added: Webhook to send form data received from CRM in GravityForms. 91 * Added: Automatic tests for robust testing and quality code. 92 85 93 = 4.0.3 = 86 94 * Enhaced: Add Pipeline name to improve Clientify pipeline implementation in Forms. -
formscrm/trunk/formscrm.php
r3324829 r3378252 4 4 * Plugin URI: https://close.technology/wordpress-plugins/formscrm/ 5 5 * Description: Connects Forms with CRM, ERP and Email Marketing. 6 * Version: 4.0. 36 * Version: 4.0.4 7 7 * Author: CloseTechnology 8 8 * Author URI: https://close.technology … … 24 24 defined( 'ABSPATH' ) || die( 'No script kiddies please!' ); 25 25 26 define( 'FORMSCRM_VERSION', '4.0. 3' );26 define( 'FORMSCRM_VERSION', '4.0.4' ); 27 27 define( 'FORMSCRM_PLUGIN', __FILE__ ); 28 28 define( 'FORMSCRM_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); -
formscrm/trunk/includes/admin/class-admin-updater.php
r3118314 r3378252 56 56 private $wc_am_software_version = ''; 57 57 58 public function __construct( $file, $product_id, $software_version, $plugin_or_theme, $api_url, $software_title = '', $text_domain = '' ) { 58 /** 59 * Constructor method for initializing the class. 60 * 61 * @param string $file The file path of the plugin or theme. 62 * @param string|int $product_id The product ID used for API requests. Can be a string (pre 2.0) or an integer (>= 2.0). 63 * @param string $software_version The version of the software. 64 * @param string $plugin_or_theme Specifies whether it is a plugin or theme. 65 * @param string $api_url The URL for the API endpoint. 66 * @param string $software_title (Optional) The title of the software. 67 * @param string $text_domain (Optional) The text domain for translation and localization. 68 * 69 * @return void 70 */ 71 public function __construct( $file, $product_id, $software_version, $plugin_or_theme, $api_url, $software_title = '', $text_domain = '' ) { 59 72 $this->no_product_id = empty( $product_id ); 60 73 $this->plugin_or_theme = esc_attr( strtolower( $plugin_or_theme ) ); … … 120 133 $this->wc_am_deactivation_tab_key = $this->data_key . '_deactivation'; 121 134 $this->wc_am_auto_update_key = $this->data_key . '_auto_update'; 122 $this->wc_am_settings_menu_title = $this->software_title . esc_html__( ' Activation', 'formscrm' ); 123 $this->wc_am_settings_title = $this->software_title . esc_html__( ' License Activation', 'formscrm' ); 135 /* translators: %s: software title */ 136 $this->wc_am_settings_menu_title = sprintf( esc_html__( '%s Activation', 'formscrm' ), $this->software_title ); 137 /* translators: %s: software title */ 138 $this->wc_am_settings_title = sprintf( esc_html__( '%s License Activation', 'formscrm' ), $this->software_title ); 124 139 $this->wc_am_menu_tab_activation_title = esc_html__( 'License Activation', 'formscrm' ); 125 140 $this->wc_am_menu_tab_deactivation_title = esc_html__( 'License Deactivation', 'formscrm' ); … … 272 287 if ( $plugin_data[ 'auto-update-forced' ] ) { 273 288 // Forced on. 274 $text = __( 'Auto-updates enabled' );289 $text = __( 'Auto-updates enabled', 'formscrm' ); 275 290 } else { 276 $text = __( 'Auto-updates disabled' );291 $text = __( 'Auto-updates disabled', 'formscrm' ); 277 292 } 278 293 … … 280 295 $time_class = ' hidden'; 281 296 } elseif ( in_array( $plugin_file, $auto_updates, true ) ) { 282 $text = __( 'Disable auto-updates' );297 $text = __( 'Disable auto-updates', 'formscrm' ); 283 298 $action = 'disable'; 284 299 $time_class = ''; 285 300 } else { 286 $text = __( 'Enable auto-updates' );301 $text = __( 'Enable auto-updates', 'formscrm' ); 287 302 $action = 'enable'; 288 303 $time_class = ' hidden'; -
formscrm/trunk/includes/crm-library/class-crmlib-clientify.php
r3324829 r3378252 777 777 $deal = array(); 778 778 $deal_product_skus = ''; 779 $last_module = 'contact'; 779 780 780 781 $module = sanitize_title( $module ); … … 894 895 $this->request( 'deals/' . $result['data']['id'] . '/products/', $res_products['data'], $apikey, 'PUT' ); 895 896 } 897 $last_module = 'deal'; 896 898 } 897 899 } else { … … 904 906 ); 905 907 } 908 909 $response_result['module'] = $last_module; 906 910 return $response_result; 907 911 } -
formscrm/trunk/includes/formscrm-library/class-gravityforms-widget.php
r3104373 r3378252 60 60 $html .= '<li>'; 61 61 $html .= sprintf( 62 // translators: %s is the name of the feed. 62 63 __( 'Feed: %s', 'formscrm' ), 63 64 isset( $feed['meta']['feedName'] ) ? $feed['meta']['feedName'] : $feed['id'], … … 77 78 $html .= '<li>'; 78 79 $html .= sprintf( 80 // translators: %s is the name of the feed. 79 81 __( 'Feed: %s', 'formscrm' ), 80 82 isset( $feed['meta']['feedName'] ) ? $feed['meta']['feedName'] : $feed['id'], -
formscrm/trunk/includes/formscrm-library/class-gravityforms.php
r3290078 r3378252 279 279 'class' => 'medium', 280 280 'onchange' => 'jQuery(this).parents("form").submit();', 281 'choices' => 282 array_merge( 281 'choices' => array_merge( 283 282 array( 283 // translators: %s is the name of the CRM as defined in settings. 284 284 array( 285 285 'label' => sprintf( 286 // translators: %s is the name of the CRM as defined in settings. 286 287 __( 'Use default CRM defined in Settings: %s', 'formscrm' ), 287 288 ucfirst( $settings_crm ) 288 289 ), 289 290 'value' => 'no', 290 ), 291 ), 291 292 ), 292 293 formscrm_get_choices() … … 296 297 $this->get_crm_fields( false, $settings ), 297 298 $this->get_crm_feed_fields( $settings ), 299 array( 300 array( 301 'name' => 'fc_crm_webhook', 302 'label' => __( 'FormsCRM webhook', 'formscrm' ), 303 'type' => 'text', 304 'class' => 'medium', 305 'input_type' => 'url', 306 'placeholder' => __( 'https://your-webhook-url.com', 'formscrm' ), 307 'tooltip' => '<h6>' . __( 'FormsCRM webhook', 'formscrm' ) . '</h6>' . __( 'Enter a URL to send a webhook form data received from CRM.', 'formscrm' ), 308 ), 309 ) 298 310 ), 299 311 ), … … 576 588 } else { 577 589 $response_message = sprintf( 578 // translators: %1$s CRM name %2$s ID number of entry created. 579 __( 'Success creating %1$s Entry ID: %2$s', 'formscrm' ), 590 // translators: %1$s CRM name %2$s CRM type %3$s ID number of entry created. 591 __( 'Success creating %1$s (%2$s) Entry ID: %3$s', 'formscrm' ), 592 isset( $settings['fc_crm_name'] ) ? esc_html( $settings['fc_crm_name'] ) : '', 580 593 esc_html( $settings['fc_crm_type'] ), 581 594 $response_result['id'] … … 583 596 $this->add_note( $entry['id'], $response_message, 'success' ); 584 597 formscrm_debug_message( $response_result['id'] ); 598 formscrm_send_webhook( $settings, $response_result ); 585 599 gform_add_meta( $entry['id'], $settings['fc_crm_type'], $response_result['id'], $form['id'] ); 586 600 } -
formscrm/trunk/includes/formscrm-library/helpers-functions.php
r2836306 r3378252 127 127 } 128 128 } 129 130 if ( ! function_exists( 'formscrm_send_webhook' ) ) { 131 /** 132 * Sends webhook 133 * 134 * @param string $settings Settings. 135 * @param array $response Response from CRM. 136 * @return void 137 */ 138 function formscrm_send_webhook( $settings, $response ) { 139 $webhook_url = isset( $settings['fc_crm_webhook'] ) ? $settings['fc_crm_webhook'] : ''; 140 if ( empty( $webhook_url ) ) { 141 return; 142 } 143 $module = isset( $response['module'] ) ? $response['module'] : ''; 144 $ids = isset( $response['id'] ) ? $response['id'] : ''; 145 $ids = explode( '|', $ids ); 146 $entry_id = end( $ids ); 147 148 $body = array( 149 'hook' => array( 150 'event' => $module . '.saved', 151 'target' => $webhook_url, 152 ), 153 'data' => array( 154 'id' => $entry_id, 155 ), 156 ); 157 $response = wp_remote_post( $webhook_url, array( 'body' => wp_json_encode( $body ) ) ); 158 return array( 159 'response' => $response, 160 'request' => $body, 161 ); 162 } 163 } -
formscrm/trunk/readme.txt
r3324829 r3378252 5 5 Requires at least: 5.5 6 6 Tested up to: 6.8 7 Stable tag: 4.0. 38 Version: 4.0. 37 Stable tag: 4.0.4 8 Version: 4.0.4 9 9 License: GPL2 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 74 74 Field that applies the autoassignment to the contact. You can add a string with the list of usernames (property emails) separated by comma (,) to apply the autoassignment. 75 75 76 **Webhook in GravityForms** 77 You can add a new field that fits with the Webhook in GravityForms. This field is optional, and you need to add the webhook url. The plugin will send the form data received from CRM to the webhook url. 78 76 79 == Installation == 77 80 … … 83 86 84 87 == Changelog == 88 89 = 4.0.4 = 90 * Added: Webhook to send form data received from CRM in GravityForms. 91 * Added: Automatic tests for robust testing and quality code. 92 85 93 = 4.0.3 = 86 94 * Enhaced: Add Pipeline name to improve Clientify pipeline implementation in Forms.
Note: See TracChangeset
for help on using the changeset viewer.