It is not the best to save my keys in my db also withut encryption.
Change your function this way:
public static function get_settings() {
$settings = wp_parse_args(
get_option( ‘woo_amazon_s3_storage’, array() ),
array(
‘amazon_access_key’ => ”,
‘amazon_access_secret’ => ”,
‘amazon_url_period’ => ”,
‘force_redirect’ => ‘no’,
‘default_bucket’ => ”,
‘default_region’ => ”,
)
);
if( defined( ‘WOO_AWS_KEY’ ) ) $settings[ ‘amazon_access_key’ ] = WOO_AWS_KEY;
if( defined( ‘WOO_AWS_SECRET’ ) ) $settings[ ‘amazon_access_secret’ ] = WOO_AWS_KEY;
return $settings;
}
They can be stored in th wp-config hidden.
It is quick and option improvement
Open
Last updated: March 8, 2024
0 comments
Log in to comment on this feature request.