Plugin Directory

Changeset 2888231


Ignore:
Timestamp:
03/28/2023 09:43:16 AM (3 years ago)
Author:
dyonic
Message:

Fix forwarded user prefilled variables

Location:
ryen-wp/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ryen-wp/trunk/README.txt

    r2884966 r2888231  
    66License: GPL 2.0
    77License URI: http://www.gnu.org/licenses/gpl-2.0.txt
    8 Stable Tag: 3.1.6
     8Stable Tag: 3.1.7
    99
    1010== Description ==
     
    2525
    2626== Changelog ==
     27= 3.1.7 =
     28* Fix forwarded user prefilled variables
     29
    2730= 3.1.6 =
    2831* Fix default apiHost typo
  • ryen-wp/trunk/public/class-ryen-public.php

    r2884966 r2888231  
    1111      if(typeof window.ryenWpUser === "undefined"){
    1212      window.ryenWpUser = {
    13           wp_id:"' .
     13          "WP ID":"' .
    1414        $wp_user->ID .
    1515        '",
    16           wp_username:"' .
     16          "WP Username":"' .
    1717        $wp_user->user_login .
    1818        '",
    19           wp_email:"' .
     19          "WP Email":"' .
    2020        $wp_user->user_email .
    2121        '",
    22           wp_first_name:"' .
     22          "WP First name":"' .
    2323        $wp_user->user_firstname .
    2424        '",
    25           wp_last_name:"' .
     25          "WP Last name":"' .
    2626        $wp_user->user_lastname .
    2727        '",
     
    6666                })) {
    6767          ' . get_option('init_snippet') . '
    68           Ryen.setPrefilledVariables({ ryenWpUser });
     68          Ryen.setPrefilledVariables({ ...ryenWpUser });
    6969         
    7070        }';
     
    102102    $bot_initializer = '<script type="module">
    103103    import Ryen from "' . $lib_url . '"
    104     Ryen.initStandard({ apiHost: "' . $api_host . '", id: "' . $id . '", ryen: "' . $ryen . '", prefilledVariables: { ryenWpUser } });</script>';
     104    Ryen.initStandard({ apiHost: "' . $api_host . '", id: "' . $id . '", ryen: "' . $ryen . '", prefilledVariables: { ...ryenWpUser } });</script>';
    105105
    106106    return  '<ryen-standard id="' . $id . '" style="width: ' . $width . '; height: ' . $height . ';"></ryen-standard>' . $bot_initializer;
  • ryen-wp/trunk/ryen.php

    r2884966 r2888231  
    44 * Plugin Name:       Ryen WP
    55 * Description:       Convert more with conversational forms
    6  * Version:           3.1.6
     6 * Version:           3.1.7
    77 * Author:            Ryen
    88 * Author URI:        http://ryen.org/
     
    1717}
    1818
    19 define('RYEN_VERSION', '3.1.6');
     19define('RYEN_VERSION', '3.1.7');
    2020
    2121function activate_ryen()
Note: See TracChangeset for help on using the changeset viewer.