• Resolved rhubeny76

    (@rhubeny76)


    Hello, I found a Forminator creditcard.php file in my site’s mu-plugins directory. Is this plugin still required or can I remove it? I’ll paste the code below. Thank you.

    <?php
    /**
    * Plugin Name: [Forminator Pro] Replace statement_descriptor
    * Description: Quick fix to replace statement_descriptor with
    * Author URI: https://wpmudev.com
    * License: GPLv2 or later
    *
    * @package WordPress
    */

    if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
    }

    add_action( 'plugins_loaded', 'replace_statement_descriptor_in_stripe_library' );

    function replace_statement_descriptor_in_stripe_library() {

    // File containing the async request class.
    $file = WP_PLUGIN_DIR . '/forminator/library/fields/stripe.php';

    // Check if async request file exists.
    if ( ! file_exists( $file ) ) {
    return;
    }

    // Get the file contents.
    $content = file_get_contents( $file );

    // Check if we have content.
    if ( ! $content ) {
    return;
    }

    // Change statement_descriptor to statement_descriptor_suffix.
    $new_content = str_replace( "['statement_descriptor']", "['statement_descriptor_suffix']", $content );

    // Update only if content changed.
    if ( $new_content !== $content ) {
    file_put_contents( $file, $new_content );
    }

    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Laura – WPMU DEV Support

    (@wpmudev-support8)

    Hi @rhubeny76

    I hope you’re well today!

    This was a patch for certain bug in the plugin but if you are using up-to-date version of Forminator it’s no longer necessary. The bug was fixed with 1.31 release.

    Best regards,
    Adam

    Thread Starter rhubeny76

    (@rhubeny76)

    Thank you. We are on version 1.32 so I have removed the plugin from mu-plugins. Resolved.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘creditcard.php found in mu-plugins directory: Is it still needed?’ is closed to new replies.