: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
namespace WPForms\Lite\Admin\Pages;
* Determine if current class is allowed to load.
public function allow_load() {
return wpforms_is_admin_page( self::SLUG );
if ( ! $this->allow_load() ) {
public function hooks() {
add_action( 'admin_enqueue_scripts', [ $this, 'enqueues' ] );
add_action( 'admin_notices', [ $this, 'notices' ] );
add_action( 'wpforms_admin_page', [ $this, 'output' ] );
* Add appropriate scripts to the Addons page.
public function enqueues() {
WPFORMS_PLUGIN_URL . 'assets/lib/list.min.js',
public function notices() {
'<p class="notice-title"><strong>%1$s</strong></p>
<p class="notice-buttons">
<a href="%3$s" class="wpforms-btn wpforms-btn-orange wpforms-btn-md" target="_blank" rel="noopener noreferrer">
esc_html__( 'Upgrade to Unlock WPForms Addons', 'wpforms-lite' ),
esc_html__( 'Access powerful marketing and payment integrations, advanced form fields, and more when you purchase our Plus, Pro, or Elite plans.', 'wpforms-lite' ),
esc_url( wpforms_admin_upgrade_link( 'addons', 'All Addons' ) ),
esc_html__( 'Upgrade Now', 'wpforms-lite' )
\WPForms\Admin\Notice::info(
* Render the Addons page.
public function output() {
$addons = wpforms()->get( 'addons' )->get_all();
if ( empty( $addons ) ) {
// WPForms 1.8.7 core includes Custom Captcha.
// The Custom Captcha addon will only work on WPForms 1.8.6 and earlier versions.
unset( $addons['wpforms-captcha'] );
echo wpforms_render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'upgrade_link_base' => wpforms_admin_upgrade_link( 'addons' ),