: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
<button class="wpforms-builder-provider-title-add js-wpforms-builder-provider-account-add <?php echo ! $is_configured ? '' : 'hidden'; ?>"
data-form_id="<?php echo \absint( $_GET['form_id'] ); ?>"
data-provider="<?php echo \esc_attr( $this->core->slug ); ?>">
<?php \esc_html_e( 'Add New Account', 'wpforms-lite' ); ?>
* Determine whether the lock field is required.
* @WPFormsBackCompat Support Drip v1.7.0 and earlier, support Uncanny Automator.
* @param string $provider The provider slug.
protected function is_lock_field_required( string $provider ): bool {
// Compatibility with the legacy Drip addon versions where the lock field was not needed.
// Uncanny Automator do not have lock field.
if ( in_array( $provider, [ 'uncanny-automator', 'drip' ], true ) ) {
* Temporary fix to remove __lock__ field with value 1 from the form post_content.
* In the future, it will be handled in save_form() method in the core for all providers.
* @param array $form Form array, usable with wp_update_post.
* @param array $data Data retrieved from $_POST and processed.
* @param array $args Update form arguments.
public function remove_connection_locks( $form, $data, $args ) {
$form_data = json_decode( stripslashes( $form['post_content'] ), true );
if ( empty( $form_data['providers'][ $this->core->slug ] ) ) {
$provider = $form_data['providers'][ $this->core->slug ];
// Remove the lock field if it's the only one and it's locked.
if ( isset( $provider[ $lock ] ) && count( $provider ) === 1 && absint( $provider[ $lock ] ) === 1 ) {
unset( $form_data['providers'][ $this->core->slug ]['__lock__'] );
$form['post_content'] = wpforms_encode( $form_data );