: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'default' => esc_html__( 'Thanks for contacting us! We will be in touch with you shortly.', 'wpforms-lite' ),
'editor_height' => '200',
'input_id' => 'wpforms-panel-field-confirmations-message-' . $field_id,
'input_class' => 'wpforms-panel-field-confirmations-message',
'subsection' => $field_id,
'class' => 'wpforms-panel-field-tinymce',
esc_html__( 'Automatically scroll to the confirmation message', 'wpforms-lite' ),
'input_class' => 'wpforms-panel-field-confirmations-message_scroll',
'subsection' => $field_id,
esc_html__( 'Confirmation Page', 'wpforms-lite' ),
'class' => 'wpforms-panel-field-confirmations-page-choicesjs',
'options' => wpforms_builder_form_settings_confirmation_get_pages( $settings->form_data, $field_id ),
'input_class' => 'wpforms-panel-field-confirmations-page',
'subsection' => $field_id,
'callback_fn' => 'select_pages',
esc_html__( 'Confirmation Redirect URL', 'wpforms-lite' ) . ' <span class="required">*</span>',
'input_class' => 'wpforms-panel-field-confirmations-redirect',
'subsection' => $field_id,
* Fires after each confirmation to add custom fields.
* @param WPForms_Builder_Panel_Settings $settings Builder panel settings.
* @param int $field_id Field ID.
do_action( 'wpforms_lite_form_settings_confirmations_single_after', $settings, $field_id );
do_action( 'wpforms_builder_settings_confirmations_after', 'confirmations', $settings );
* Load assets for lite version with the admin builder.
public function builder_enqueues() {
$min = wpforms_get_min_suffix();
WPFORMS_PLUGIN_URL . "assets/lite/js/admin/builder/admin-builder-lite{$min}.js",
[ 'jquery', 'jquery-confirm' ],
'disable_notifications' => sprintf(
wp_kses( /* translators: %s - WPForms.com docs page URL. */
__( 'You\'ve just turned off notification emails for this form. Since entries are not stored in WPForms Lite, notification emails are recommended for collecting entry details. For setup steps, <a href="%s" target="_blank" rel="noopener noreferrer">please see our notification tutorial</a>.', 'wpforms-lite' ),
esc_url( wpforms_utm_link( 'https://wpforms.com/docs/setup-form-notification-wpforms/', 'Builder Notifications', 'Disable Notifications Alert' ) )
$strings = apply_filters( 'wpforms_lite_builder_strings', $strings );
* Display upgrade notice at the bottom on the plugin settings pages.
* @param string $view Current view inside the plugin settings page.
public function settings_cta( $view ) {
if ( get_option( 'wpforms_lite_settings_upgrade', false ) || apply_filters( 'wpforms_lite_settings_upgrade', false ) ) {
<div class="settings-lite-cta">
<a href="#" class="dismiss" title="<?php esc_attr_e( 'Dismiss this message', 'wpforms-lite' ); ?>"><i class="fa fa-times-circle" aria-hidden="true"></i></a>
<h5><?php esc_html_e( 'Get WPForms Pro and Unlock all the Powerful Features', 'wpforms-lite' ); ?></h5>
<p><?php esc_html_e( 'Thanks for being a loyal WPForms Lite user. Upgrade to WPForms Pro to unlock all the awesome features and experience why WPForms is consistently rated the best WordPress form builder.', 'wpforms-lite' ); ?></p>
wp_kses( /* translators: %s - star icons. */
__( 'We know that you will truly love WPForms. It has over 13,000+ five star ratings (%s) and is active on over 6 million websites.', 'wpforms-lite' ),
str_repeat( '<i class="fa fa-star" aria-hidden="true"></i>', 5 ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
<h6><?php esc_html_e( 'Pro Features:', 'wpforms-lite' ); ?></h6>
printf( /* translators: %s - number of templates. */
esc_html__( '%s customizable form templates', 'wpforms-lite' ),
<li><?php esc_html_e( 'Store and manage form entries in WordPress', 'wpforms-lite' ); ?></li>
<li><?php esc_html_e( 'Unlock all fields & features, including smart conditional logic', 'wpforms-lite' ); ?></li>
<li><?php esc_html_e( 'Create powerful custom calculation forms', 'wpforms-lite' ); ?></li>
<li><?php esc_html_e( 'Make surveys and generate reports', 'wpforms-lite' ); ?></li>
<li><?php esc_html_e( 'Accept user-submitted content with the Post Submissions addon', 'wpforms-lite' ); ?></li>
<li><?php esc_html_e( '7000+ integrations with marketing and payment services', 'wpforms-lite' ); ?></li>
<li><?php esc_html_e( 'Let users save & resume submissions to prevent abandonment', 'wpforms-lite' ); ?></li>
<li><?php esc_html_e( 'Take payments with Stripe, PayPal, Square, & Authorize.Net', 'wpforms-lite' ); ?></li>
<li><?php esc_html_e( 'Export entries to Google Sheets, Excel, and CSV', 'wpforms-lite' ); ?></li>
<li><?php esc_html_e( 'Collect signatures, geolocation data, and file uploads', 'wpforms-lite' ); ?></li>
<li><?php esc_html_e( 'Create user registration and login forms', 'wpforms-lite' ); ?></li>
<?php $utm_content = ucwords( $view ) . ' Tab'; ?>
<a href="<?php echo esc_url( wpforms_admin_upgrade_link( 'settings-upgrade', $utm_content ) ); ?>" target="_blank" rel="noopener noreferrer">
<?php esc_html_e( 'Get WPForms Pro Today and Unlock all the Powerful Features »', 'wpforms-lite' ); ?>
__( '<strong>Bonus:</strong> WPForms Lite users get <span class="green">50% off regular price</span>, automatically applied at checkout.', 'wpforms-lite' ),
<script type="text/javascript">
$( document ).on( 'click', '.settings-lite-cta .dismiss', function ( event ) {
action: 'wpforms_lite_settings_upgrade'
$( '.settings-lite-cta' ).remove();
* Dismiss upgrade notice at the bottom on the plugin settings pages.
public function settings_cta_dismiss() {
if ( ! wpforms_current_user_can() ) {
update_option( 'wpforms_lite_settings_upgrade', time() );
* Display sample data and notify user that entries is a pro feature.
public function entries_page() {
if ( wpforms_is_admin_page( 'entries', 'sample' ) ) {
$this->entry_single_page();
if ( wpforms_is_admin_page( 'entries' ) ) {
$this->entries_list_page();
* Display the Entries List page with sample data.
private function entries_list_page() {
$is_lite_connect_enabled = LiteConnect::is_enabled();
$is_lite_connect_allowed = LiteConnect::is_allowed();
wp_enqueue_style( 'wpforms-admin-entry-list' );
wp_enqueue_script( 'wpforms-admin-entry-list' );
echo wpforms_render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'admin/entries/overview/entry-list',
'is_lite_connect_enabled' => $is_lite_connect_enabled,
'is_lite_connect_allowed' => $is_lite_connect_allowed,
'entries_count' => LiteConnectIntegration::get_new_entries_count(),
'enabled_since' => LiteConnectIntegration::get_enabled_since(),
'sample_entries' => $this->get_entries_list_data(),
'utm' => $this->get_entries_utm(),
* Display the Single Entry page with sample data.
private function entry_single_page() {
wp_enqueue_style( 'wpforms-admin-view-entry' );
wp_enqueue_script( 'wpforms-admin-view-entry' );
echo wpforms_render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'admin/entries/single/entry',
'utm' => $this->get_entries_utm(),
* Add appropriate styling to addons page.
public function addon_page_enqueues() {
_deprecated_function( __METHOD__, '1.6.7 of the WPForms plugin', "wpforms()->get( 'addons_page' )->enqueues()" );
wpforms()->get( 'addons_page' )->enqueues();
public function addons_page() {
_deprecated_function( __METHOD__, '1.6.7 of the WPForms plugin', "wpforms()->get( 'addons_page' )->output()" );
if ( ! wpforms_is_admin_page( 'addons' ) ) {
wpforms()->get( 'addons_page' )->output();
* Increase entries count once a form is submitted.
* @since 1.8.2 Added Payment ID.
* @param array $fields Set of form fields.
* @param array $entry Entry contents.
* @param array $form_data Form data.
* @param int $entry_id Entry ID.
* @param int $payment_id Payment ID for the payment form.
public function update_entry_count( $fields, $entry, $form_data, $entry_id, $payment_id ) {
if ( ! empty( $form_data['spam_reason'] ) ) {
* Filters whether to allow counting entries for Lite users.
* @param bool $allow_entries_count True to allow, false to disallow. Default: true.
if ( ! apply_filters( 'wpforms_dash_widget_allow_entries_count_lite', true ) ) { // phpcs:ignore WPForms.PHP.ValidateHooks.InvalidHookName
$form_id = absint( $form_data['id'] );
if ( empty( $form_id ) ) {
if ( wpforms_is_form_template( $form_id ) ) {
if ( add_post_meta( $form_id, 'wpforms_entries_count', 1, true ) ) {
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching
SET meta_value = meta_value + 1
WHERE post_id = %d AND meta_key = 'wpforms_entries_count'",
* Submit entry to the Lite Connect API.
* @since 1.8.2 Added Payment ID.
* @param array $fields Set of form fields.
* @param array $entry Entry contents.
* @param array $form_data Form data.
* @param int $entry_id Entry ID.
* @param int $payment_id Payment ID for the payment form.
public function entry_submit( $fields, $entry, $form_data, $entry_id, $payment_id ) {
$submission = wpforms()->get( 'submission' );
$submission->register( $fields, $entry, $form_data['id'], $form_data );
// Prepare the entry args.
$entry_args = $submission->prepare_entry_data();
$entry_args['type'] = 'payment';
$entry_args['payment_id'] = $payment_id;
if ( ! empty( $form_data['spam_reason'] ) ) {
$entry_args['status'] = 'spam';
// Submit entry args and form data to the Lite Connect API.
LiteConnect::is_allowed() &&
LiteConnect::is_enabled() &&
( new LiteConnectIntegration() )->submit( $entry_args, $form_data );
* Add Lite-specific templates to the list of searchable template paths.
* @param array $paths Paths to templates.
public function add_templates( $paths ) {
$paths[102] = trailingslashit( __DIR__ . '/templates' );
* Render Upgrade to Pro admin bar menu item.
* @param WP_Admin_Bar $wp_admin_bar WordPress Admin Bar object.
public function upgrade_to_pro_menu( WP_Admin_Bar $wp_admin_bar ) {
$current_screen = is_admin() ? get_current_screen() : null;
$upgrade_utm_content = $current_screen === null ? 'Upgrade to Pro' : 'Upgrade to Pro - ' . $current_screen->base;
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
$upgrade_utm_content = empty( $_GET['view'] ) ? $upgrade_utm_content : $upgrade_utm_content . ': ' . sanitize_key( $_GET['view'] );
'parent' => 'wpforms-menu',
'id' => 'wpforms-upgrade',
'title' => esc_html__( 'Upgrade to Pro', 'wpforms-lite' ),
'href' => esc_url( $this->admin_upgrade_link( 'admin-bar', $upgrade_utm_content ) ),
'rel' => 'noopener noreferrer',
* Upgrade link used within the various admin pages.
* TODO: This is a duplicate of the function in the WPForms class. We should refactor this to use the same function.
* @param string $medium URL parameter: utm_medium.
* @param string $content URL parameter: utm_content.
private function admin_upgrade_link( string $medium = 'link', string $content = '' ): string {
$url = 'https://wpforms.com/lite-upgrade/';
if ( wpforms()->is_pro() ) {
$license_key = wpforms_get_license_key();
sanitize_text_field( $license_key ),
'https://wpforms.com/pricing/'
$upgrade = wpforms_utm_link( $url, apply_filters( 'wpforms_upgrade_link_medium', $medium ), $content ); // phpcs:ignore WPForms.PHP.ValidateHooks.InvalidHookName, WPForms.Comments.PHPDocHooks.RequiredHookDocumentation
* @param string $upgrade Upgrade links.
return apply_filters( 'wpforms_upgrade_link', $upgrade ); // phpcs:ignore WPForms.PHP.ValidateHooks.InvalidHookName