: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if ( ! defined( 'ABSPATH' ) ) {
class WPForms_Builder_Panel_Payments extends WPForms_Builder_Panel {
// Define panel information.
$this->name = esc_html__( 'Payments', 'wpforms-lite' );
$this->slug = 'payments';
* Output the Payments panel sidebar.
public function panel_sidebar() {
// Sidebar contents are not valid unless we have a form.
$this->panel_sidebar_section( esc_html__( 'Default', 'wpforms-lite' ), 'default' );
do_action( 'wpforms_payments_panel_sidebar', $this->form );
* Output the Payments panel primary content.
public function panel_content() {
// An array of all the active provider addons.
$payments_active = apply_filters( 'wpforms_payments_available', [] );
// Check if there is a form created. When no form has been created
// yet let the user know we need a form to setup a payment.
echo '<div class="wpforms-alert wpforms-alert-info">';
__( 'You need to <a href="#" class="wpforms-panel-switch" data-panel="setup">setup your form</a> before you can manage these settings.', 'wpforms-lite' ),
if ( empty( $payments_active ) ) {
// Check for active payment addons. When no payment addons are
// activated let the user know they need to install/activate an
// addon to setup a payment.
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-default">
<div class="illustration illustration-payments"></div>
<h5>' . esc_html__( 'Install Your Payment Integration', 'wpforms-lite' ) . '</h5>
/* translators: %s - addons page URL. */
__( 'It seems you do not have any payment addons activated. You can head over to the <a href="%s">Addons page</a> to install and activate the addon for your payment service.', 'wpforms-lite' ),
esc_url( admin_url( 'admin.php?page=wpforms-addons' ) )
// Everything is good - display default instructions.
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-default">
<div class="illustration illustration-payments"></div>
<h5>' . esc_html__( 'Install Your Payment Integration', 'wpforms-lite' ) . '</h5>
<p>' . esc_html__( 'It seems you don\'t have any payment addons activated. Click one of the available addons and start accepting payments today!', 'wpforms-lite' ) . '</p>
do_action( 'wpforms_payments_panel_content', $this->form );
new WPForms_Builder_Panel_Payments();