Ar_Model_Viewer_For_Woocommerce_Logger
in package
The logger functionality of the plugin.
Tags
Table of Contents
Properties
- $plugin_name : string
- The ID of this plugin.
- $plugin_prefix : string
- The unique prefix of this plugin.
- $version : string
- The version of this plugin.
Methods
- __construct() : mixed
- Initialize the class and set its properties.
- log_to_woocommerce() : mixed
- Logs messages to WooCommerce system with varying levels of severity.
Properties
$plugin_name
The ID of this plugin.
private
string
$plugin_name
The ID of this plugin.
Tags
$plugin_prefix
The unique prefix of this plugin.
private
string
$plugin_prefix
The string used to uniquely prefix technical functions of this plugin.
Tags
$version
The version of this plugin.
private
string
$version
The current version of this plugin.
Tags
Methods
__construct()
Initialize the class and set its properties.
public
__construct(string $plugin_name, string $plugin_prefix, string $version) : mixed
Parameters
- $plugin_name : string
-
The name of the plugin.
- $plugin_prefix : string
-
The unique prefix of this plugin.
- $version : string
-
The version of this plugin.
Tags
log_to_woocommerce()
Logs messages to WooCommerce system with varying levels of severity.
public
log_to_woocommerce(string $message[, string $level = 'info' ]) : mixed
This function checks if logging is enabled in the plugin's settings and, if so, logs messages using WooCommerce's logging system based on the specified level.
Parameters
- $message : string
-
The message to be logged.
- $level : string = 'info'
-
The severity level of the log. Default is 'info'.