Adds missing property declarations to the WC_Alipay class to resolve deprecated warnings in PHP 8.2 and above. Also refactors the class to use explicit property declarations and minor code style improvements for better compatibility and maintainability.
13 lines
411 B
PHP
Executable file
13 lines
411 B
PHP
Executable file
<?php
|
|
|
|
if ( ! defined( 'ABSPATH' ) || ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
|
exit; // Exit if accessed directly
|
|
}
|
|
|
|
global $wpdb;
|
|
|
|
$option_prefix = $wpdb->esc_like( 'woo_alipay_' );
|
|
$wc_option_settings = 'woocommerce_alipay_settings';
|
|
$sql = "DELETE FROM $wpdb->options WHERE `option_name` = '%s'";
|
|
|
|
$wpdb->query( $wpdb->prepare( $sql, $wc_option_settings ) ); // @codingStandardsIgnoreLine
|