: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if ( ! defined( 'ABSPATH' ) ) {
class WPForms_Providers {
* Primary class constructor.
public function __construct() {
* Load and init the base provider class.
// Parent class template.
require_once WPFORMS_PLUGIN_DIR . 'includes/providers/class-base.php';
// Load default templates on WP init.
add_action( 'wpforms_loaded', [ $this, 'load' ] );
* Load default marketing providers.
$providers = (array) apply_filters( 'wpforms_load_providers', $providers );
foreach ( $providers as $provider ) {
$provider = sanitize_file_name( $provider );
$path = WPFORMS_PLUGIN_DIR . 'includes/providers/class-' . $provider . '.php';
if ( file_exists( $path ) ) {
* Allow third-party plugins to load their own providers.
do_action( "wpforms_load_{$provider}_provider" );