WP Request Callback

Easily add a form to any page on your site to allow visitors to leave their name and number to request a callback.
Settings
The settings page can be reached by clicking on Settings in the WordPress admin menu, and then clicking on WP Request Callback.
Here you can add an email address to receive email notifications, as well as a Slack Webhook URL to enable notifications straight into a Slack channel.
Also on this page you can choose the default theme color. This will be used by the shortcode as the background color of the submit button and the border color of the focussed inputs.
The color can be overridden on a per form basis by using the shortcode settings as documented below.
Configuring the Shortcode
The shortcode usage is as follows: [wprc success_message="This is my custom success message." error_message="Something went wrong." color="#9f7aea"]
- success_message is the text displayed to the user after the form is submitted successfully. It is optional and if omitted the default message is ‘Thanks for submitting your callback request.’
- error_message is the text displayed to the user if an unexpected error occurs with the submission. It is optional and if omitted the default message is ‘Something went wrong. Please try again.’
- color is a hex color code that is used to style the button and inputs of the form. It is optional, and if omitted, the color set on the settings page is used, or blue by default (#9f7aea).
API Documentation
The plugin makes use of the WordPress REST API.
Endpoint
POST /wp-json/wprc/v1/callback-requests
Request Body
name: Required, string.
phone: Required, string, numbers or spaces.
Example:
{ name: ‘Name’, phone: ‘01234567890’ }
Responses
Success
Status: 201
Response data: ‘Success’
Validation error
Status: 422
Response data: { errors: { name: [‘Example validation error’], phone: [‘Example validation error’] } }
Download & install the zip archive
The plugin package installer can be downloaded from the WP2E project tab called “code”.
1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.
2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.
3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.
- Give a name to your project
- Download the Installer Package
- Install & activate the plugin locally
- Install the suggested dependencies
Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.



