: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Integration for MC4WP Form
* @copyright Copyright (c) 2023, Code Atlantic LLC
class PUM_Integration_Form_MC4WP extends PUM_Abstract_Integration_Form {
* Unique key identifier for this provider.
* Text label that will be used throughout the various options screens.
public function label() {
return __( 'MailChimp for WordPress' );
* Should return true when the required form plugin is active.
public function enabled() {
return defined( 'MC4WP_VERSION' ) && MC4WP_VERSION;
* Return a useable array of all forms from this provider.
public function get_forms() {
return mc4wp_get_forms();
* Return a single form by ID.
public function get_form( $id ) {
return mc4wp_get_form( $id );
* Returns an array of options for a select list.
* Should be in the format of $formId => $formLabel
public function get_form_selectlist() {
$forms = $this->get_forms();
foreach ( $forms as $form ) {
$form_selectlist[ $form->ID ] = $form->name;
* Load a custom script file to handle AJAX based submissions or other integrations with Popup Maker frontend.
public function custom_scripts( $js = [] ) {
* Load custom styles for hacking some elements specifically inside popups, such as datepickers.
public function custom_styles( $css = [] ) {