Replies: 2
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 );
}
}