Automattic\WooCommerce\Internal\Admin\Logging
Settings::get_database_settings_definitions
The definitions used by WC_Admin_Settings to render settings related to database log handlers.
Method of the class: Settings{}
No Hooks.
Returns
Array.
Usage
// private - for code of main (parent) class only $result = $this->get_database_settings_definitions(): array;
Settings::get_database_settings_definitions() Settings::get database settings definitions code WC 10.9.3
private function get_database_settings_definitions(): array {
global $wpdb;
$table = "{$wpdb->prefix}woocommerce_log";
$location_info = sprintf(
// translators: %s is the name of a table in the database.
__( 'Log entries are stored in this database table: %s', 'woocommerce' ),
"<code>$table</code>"
);
return array(
'file_start' => array(
'title' => __( 'Database settings', 'woocommerce' ),
'id' => self::PREFIX . 'settings',
'type' => 'title',
),
'database_table' => array(
'title' => __( 'Location', 'woocommerce' ),
'type' => 'info',
'text' => $location_info,
),
'file_end' => array(
'id' => self::PREFIX . 'settings',
'type' => 'sectionend',
),
);
}