Plugin Directory

Changeset 2361504


Ignore:
Timestamp:
08/14/2020 10:27:45 PM (6 years ago)
Author:
foreupsoftware
Message:

add experimental option for dev

Location:
foreup-forms/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • foreup-forms/trunk/README.txt

    r2361471 r2361504  
    55Requires at least: 5.1
    66Tested up to: 5.2
    7 Stable tag: 1.2.1
     7Stable tag: 1.2.2
    88Requires PHP: 5.2.4
    99License: GPLv2 or later
     
    6060= 1.2.1 =
    6161*updated error handling and required defaults for creating customers
     62
     63= 1.2.2 =
     64*add experimental features option
  • foreup-forms/trunk/assets/js/frontend.js

    r2361471 r2361504  
    776776        birthdateReq: options.birthdateReq,
    777777        header: options.header,
    778         recaptchaKey: options.recaptchaKey
     778        recaptchaKey: options.recaptchaKey,
     779        experimental: options.experimental
    779780      },
    780781      errors: [],
  • foreup-forms/trunk/assets/src/frontend/App.vue

    r2361471 r2361504  
    191191        birthdateReq: options.birthdateReq,
    192192        header: options.header,
    193         recaptchaKey: options.recaptchaKey
     193        recaptchaKey: options.recaptchaKey,
     194        experimental: options.experimental,
    194195      },
    195196      errors: [],
  • foreup-forms/trunk/includes/class-frontend.php

    r2057784 r2361504  
    4646            'header' => get_option('formup_header'),
    4747            'recaptchaKey' => get_option('formup_recaptcha_key'),
     48            'experimental' => get_option('formup_experimental'),
    4849        );
    4950        wp_localize_script('formup-frontend', 'options', $scriptData);
  • foreup-forms/trunk/package-lock.json

    r2361471 r2361504  
    11{
    22    "name": "foreup-forms",
    3     "version": "1.2.1",
     3    "version": "1.2.2",
    44    "lockfileVersion": 1,
    55    "requires": true,
  • foreup-forms/trunk/package.json

    r2361471 r2361504  
    11{
    22    "name": "foreup-forms",
    3     "version": "1.2.1",
     3    "version": "1.2.2",
    44    "description": "Forms that integrate with foreUP Golf Software",
    55    "author": "Nathan Johnson <nathan@foreup.com>",
  • foreup-forms/trunk/plugin.php

    r2361471 r2361504  
    44Plugin URI: https://foreup.com/
    55Description: Forms that integrate with foreUP Golf Software
    6 Version: 1.2.1
     6Version: 1.2.2
    77Author: foreUP Software
    88Author URI: https://freakingjohnson.github.io/portfolio/
     
    5757     * @var string
    5858     */
    59     public $version = '1.2.1';
     59    public $version = '1.2.2';
    6060
    6161    /**
     
    266266                        <td>
    267267                            <input type="checkbox" name="formup_account_prefix" value="1" <?php checked(1, get_option('formup_account_prefix'), true);?> />
     268                        </td>
     269                    </tr>
     270                </table>
     271                <table>
     272                    <p>Enable experimental features <strong>WARNING: don't use unless you accept the consequences.</strong></p>
     273                    <tr valign="top">
     274                        <th scope="row"><label for="formup_experimental">Use Account Number Prefix "ON"</label></th>
     275                        <td>
     276                            <input type="checkbox" name="formup_experimental" value="1" <?php checked(1, get_option('formup_experimental'), true);?> />
    268277                        </td>
    269278                    </tr>
     
    9931002                      \"country\": \"United States\",
    9941003                      \"handicap_account_number\": \"\",
    995                       \"handicap_score\": \"\",
     1004                      \"handicap_score\": \"0\",
    9961005                      \"comments\": \"\"
    9971006                              }
     
    10261035                      \"country\": \"United States\",
    10271036                      \"handicap_account_number\": \"\",
    1028                       \"handicap_score\": \"\",
     1037                      \"handicap_score\": \"0\",
    10291038                      \"comments\": \"\"
    10301039                              }
     
    10411050        );
    10421051
    1043         $response = wp_remote_post("https://www.foreupsoftware.com/api_rest/index.php/courses/$courseid/customers", $args);
     1052        if(get_option('formup_experimental')){
     1053            $response = wp_remote_post("https://dev.foreupsoftware.com/api_rest/index.php/courses/$courseid/customers", $args);
     1054        }else {
     1055            $response = wp_remote_post("https://www.foreupsoftware.com/api_rest/index.php/courses/$courseid/customers", $args);
     1056        }
    10441057
    10451058        $body = wp_remote_retrieve_body($response);
     
    11991212        );
    12001213
    1201         $response = wp_remote_request("https://www.foreupsoftware.com/api_rest/index.php/courses/$courseid/customers/$customerid", $args);
     1214        if(get_option('formup_experimental')){
     1215            $response = wp_remote_request("https://dev.foreupsoftware.com/api_rest/index.php/courses/$courseid/customers/$customerid", $args);
     1216        }else {
     1217            $response = wp_remote_request("https://www.foreupsoftware.com/api_rest/index.php/courses/$courseid/customers/$customerid", $args);
     1218        }
    12021219
    12031220        $body = wp_remote_retrieve_body($response);
Note: See TracChangeset for help on using the changeset viewer.