Plugin Directory

Changeset 2320644


Ignore:
Timestamp:
06/09/2020 07:57:13 AM (6 years ago)
Author:
ThemeCatcher
Message:

Release version 1.0.2

Location:
quform-zapier
Files:
63 added
5 edited

Legend:

Unmodified
Added
Removed
  • quform-zapier/trunk/library/Quform/Zapier/Dispatcher.php

    r2265496 r2320644  
    1818        add_action('init', array($container['zapierUpgrader'], 'upgradeCheck'), 1);
    1919
    20         add_filter('quform_post_process', array($container['zapierIntegrationController'], 'process'), 10, 2);
     20        add_filter(apply_filters('quform_zapier_processor_hook', 'quform_post_process'), array($container['zapierIntegrationController'], 'process'), 10, 2);
    2121
    2222        if (is_admin() || defined('QUFORM_TESTING')) {
  • quform-zapier/trunk/library/Quform/Zapier/Integration.php

    r2265496 r2320644  
    3030    /**
    3131     * Run the integration
     32     *
     33     * @param   array  $result  The result to return to the form processor, an empty array by default
     34     * @return  array
    3235     */
    33     public function run()
     36    public function run(array $result)
    3437    {
    3538        if ( ! Quform::isNonEmptyString($this->config('webhookUrl'))) {
     
    4245        $data = apply_filters('quform_zapier_integration_data_' . $this->config('id'), $data, $this->form, $this);
    4346
    44         wp_remote_post($this->config('webhookUrl'), array('body' => $data));
     47        $response = wp_remote_post($this->config('webhookUrl'), array('body' => $data));
     48
     49        $result = apply_filters('quform_zapier_response', $result, $response, $this->form, $this);
     50        $result = apply_filters('quform_zapier_response' . $this->config('id'), $result, $response, $this->form, $this);
     51
     52        return $result;
    4553    }
    4654
  • quform-zapier/trunk/library/Quform/Zapier/Integration/Controller.php

    r2265496 r2320644  
    4040     * Run any integrations for the given form
    4141     *
    42      * @param   array        $result
    43      * @param   Quform_Form  $form
     42     * @param   array        $result  The result to return to the form processor, an empty array by default
     43     * @param   Quform_Form  $form    The form that is currently being processed
    4444     * @return  array
    4545     */
     
    6161            if ($integration->config('logicEnabled') && count($integration->config('logicRules'))) {
    6262                if ($form->checkLogicAction($integration->config('logicAction'), $integration->config('logicMatch'), $integration->config('logicRules'))) {
    63                     $integration->run();
     63                    $result = $integration->run($result);
    6464                }
    6565            } else {
    66                 $integration->run();
     66                $result = $integration->run($result);
    6767            }
    6868        }
  • quform-zapier/trunk/quform-zapier.php

    r2265496 r2320644  
    55 * Plugin URI: https://www.quform.com/addons/zapier
    66 * Description: Easily integrate Zapier with Quform forms.
    7  * Version: 1.0.1
     7 * Version: 1.0.2
    88 * Author: ThemeCatcher
    99 * Author URI: https://www.themecatcher.net
     
    1616}
    1717
    18 define('QUFORM_ZAPIER_VERSION', '1.0.1');
     18define('QUFORM_ZAPIER_VERSION', '1.0.2');
    1919define('QUFORM_ZAPIER_PATH', dirname(__FILE__));
    2020define('QUFORM_ZAPIER_NAME', basename(QUFORM_ZAPIER_PATH));
  • quform-zapier/trunk/readme.txt

    r2265496 r2320644  
    55Requires at least: 4.6
    66Tested up to: 5.4
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88Requires PHP: 5.2.4
    99License: GPLv2 or later
     
    4646== Changelog ==
    4747
     48= 1.0.2 =
     49* Added a filter hook on the form processor hook
     50* Added a filter hook on the form processor result after the response from Zapier
     51
    4852= 1.0.1 =
    4953* Fixed a conflict with WPML
Note: See TracChangeset for help on using the changeset viewer.