Changeset 2057112
- Timestamp:
- 03/25/2019 07:36:52 PM (7 years ago)
- Location:
- foreup-forms/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (1 diff)
-
package.json (modified) (1 diff)
-
plugin.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
foreup-forms/trunk/README.txt
r2056366 r2057112 5 5 Requires at least: 5.1 6 6 Tested up to: 5.1 7 Stable tag: 1.1. 27 Stable tag: 1.1.3 8 8 Requires PHP: 5.2.4 9 9 License: GPLv2 or later -
foreup-forms/trunk/package.json
r2056366 r2057112 1 1 { 2 2 "name": "foreUP Forms", 3 "version": "1.1. 2",3 "version": "1.1.3", 4 4 "description": "Forms that integrate with foreUP Golf Software", 5 5 "author": "Nathan Johnson <nathan@foreup.com>", -
foreup-forms/trunk/plugin.php
r2056458 r2057112 4 4 Plugin URI: https://foreup.com/ 5 5 Description: Forms that integrate with foreUP Golf Software 6 Version: 1.1. 26 Version: 1.1.3 7 7 Author: foreUP Software 8 8 Author URI: https://freakingjohnson.github.io/portfolio/ … … 397 397 * @return void 398 398 */ 399 public function check_account_num(){ 399 public function check_account_num() 400 { 400 401 $courseid = get_option('formup_courseid'); 401 402 $account_num = get_option('formup_account_counter'); 402 if (get_option('formup_account_prefix') and get_option('formup_account_counter')){403 if (get_option('formup_account_prefix') and get_option('formup_account_counter')) { 403 404 $account_num = "ON" . $account_num; 404 405 }; … … 418 419 $res = wp_remote_retrieve_body($response); 419 420 $res1 = json_decode($res); 420 $res2 = $res1 ->data;421 if (count($res2)){422 update_option('formup_account_counter', get_option('formup_account_counter') +1);421 $res2 = $res1->data; 422 if (count($res2)) { 423 update_option('formup_account_counter', get_option('formup_account_counter') + 1); 423 424 $this->check_account_num(); 424 425 }; … … 429 430 $formup_password = get_option('formup_password'); 430 431 $this->gen_token($formup_username, $formup_password); 431 $this->check_account_num();432 // $this->check_account_num(); 432 433 $this->includes(); 433 434 $this->init_hooks(); … … 878 879 public function check_email(WP_REST_Request $request) 879 880 { 881 $this->check_account_num(); 880 882 $courseid = get_option('formup_courseid'); 881 883 $email = sanitize_text_field(trim($request['email'])); … … 907 909 $account_prefix = "ON"; 908 910 909 if (!get_option('formup_account_counter')){911 if (!get_option('formup_account_counter')) { 910 912 $account_number = null; 911 } elseif (get_option('formup_account_prefix') and get_option('formup_account_counter')){913 } elseif (get_option('formup_account_prefix') and get_option('formup_account_counter')) { 912 914 $account_number = $account_prefix . $account_num; 913 915 } else { … … 932 934 date_default_timezone_set('UTC'); 933 935 934 if ($account_number){936 if ($account_number) { 935 937 $body = "{ 936 938 \"data\": { … … 966 968 } 967 969 }"; 968 } else{970 } else { 969 971 $body = "{ 970 972 \"data\": { … … 1013 1015 if ($body) { 1014 1016 $this->confirmation_email($email, $first, $last); 1015 if ($account_number){1016 update_option('formup_account_counter', get_option('formup_account_counter') +1);1017 if ($account_number) { 1018 update_option('formup_account_counter', get_option('formup_account_counter') + 1); 1017 1019 } 1018 1020 }
Note: See TracChangeset
for help on using the changeset viewer.