Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'rest_api_init', 'custom_api_register_with_email_route');
- function custom_api_register_with_email_route() {
- register_rest_route('custom-api/v1', '/register/', array(
- 'methods' => 'GET',
- 'callback' => 'custom_api_register_user_with_email'
- ));
- }
- function custom_api_register_user_with_email() {
- $input_values['input_1_1_3'] = 'mike';
- $input_values['input_1_1_6'] = 'geek';
- $input_values['input_1_13'] = '12345678';
- $input_values['input_1_3'] = 'ram';
- $input_values['input_1_4'] = 'mike.geek@example.com';
- $input_values['input_1_5'] = '12345678';
- $input_values['input_1_5_2'] = '12345678';
- $input_values['gform_save'] = true; // support for save and continue
- $result = GFAPI::submit_form(1, $input_values );
- return $result;
- }
- {
- "is_valid": true,
- "page_number": 1,
- "source_page_number": 1,
- "confirmation_message": "",
- "confirmation_type": "message",
- "entry_id": "",
- "resume_token": "6b8a141b12b8465aad1e428ccb9147b1"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement