Plugin Directory

Changeset 2557875


Ignore:
Timestamp:
07/02/2021 07:11:05 PM (5 years ago)
Author:
earnware
Message:

Added ability to specify a workflow to trigger on an Earnware subscribe form submission.

Location:
earnware-connect/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • earnware-connect/trunk/README.txt

    r2545821 r2557875  
    2828== Changelog ==
    2929
     30= 1.0.66 =
     31* Added ability to specify a workflow to trigger on an Earnware subscribe form submission
     32
    3033= 1.0.65 =
    3134* Modified CCPA data that is visible to the subscriber.
  • earnware-connect/trunk/public/class-wp-ew-public.php

    r2545821 r2557875  
    185185    public function ew_ccpa_url_handler($att, $content, $tag) {
    186186        $options = get_option($this->plugin_name);     
    187         $userId = isset($att["userId"]) ? $att["userId"] : $options["user_id"];
     187        $userId = isset($att["user_id"]) ? $att["user_id"] : $options["user_id"];   
    188188        return 'https://www.safesubscribe.org/request-form/?brandId=' . $userId;
    189189    }       
     
    195195        $autofill = isset($att["autofill"]) ? $att["autofill"] : 'false';
    196196        $formId = isset($att["id"]) ? $att["id"] : uniqid("ew_subform_", false);
    197         $userId = isset($att["userId"]) ? $att["userId"] : $options["user_id"];
     197        $userId = isset($att["user_id"]) ? $att["user_id"] : $options["user_id"];
     198        $workflowId = isset($att["workflow_id"]) ? $att["workflow_id"] : false;
    198199        $track_utm_custom = preg_replace("/\r|\n/", "|", $options["track_utm_custom"]);
    199200        $default_utm_campaign = isset($att["utm_campaign"]) ? $att["utm_campaign"] : "";
     
    390391        <div style="display: none" class="_aHtml">{$altHtml}</div>
    391392        <div class="sub-form-container _pHtml" dir="ltr" lang="en-US">
    392             <form id='{$formId}' action="https://api.earnware.com/production/contacts" class="sub-form" method="post">     
     393            <form id='{$formId}' action="https://api.earnware.com/staging/contacts" class="sub-form" method="post">     
    393394                <div class="sub-form-body-container">
    394395                    <div class="sub-form-body">
     
    528529                data.utm_term = EW.getItem("utm_term") || '{$default_utm_term}';
    529530                data.sourceId = EW.getItem("utm_source") || '{$default_utm_source}' || window.location.hostname;
     531                data.workflowId = '{$workflowId}';
    530532
    531533                data.utm_placement = data.placementId;
     
    559561                }).done(function(response) {
    560562                    EW.setRoles(EW.Roles.Subscriber);
    561                     console.log('success :)');                 
     563                    console.log('success :)', response);                   
    562564
    563565                    jQuery("#{$formId} input.submit").val(existingSubmitText);
  • earnware-connect/trunk/wp-ew.php

    r2545821 r2557875  
    1717 * Plugin URI:        https://www.earnware.com/wordpress/plugins/earnware-connect
    1818 * Description:       A plugin to connect any wordpress site to the Earnware Dashboard.
    19  * Version:           1.0.65
     19 * Version:           1.0.66
    2020 * Author:            Earnware Corporation
    2121 * Author URI:        https://earnware.com/about/
     
    3131}
    3232
    33 define( 'PLUGIN_NAME_VERSION', '1.0.65' );
     33define( 'PLUGIN_NAME_VERSION', '1.0.66' );
    3434
    3535/**
Note: See TracChangeset for help on using the changeset viewer.