Add your custom log to woocommerce

You may use this code to save custom information in wp loop

if (function_exists('wc_get_logger')) {
           $logger = wc_get_logger();
           $context = array( 'source' => 'Log name here'  );
           $logger->info( $err_msg, $context );
}

It will be available in woocommerce Status-> Logs tab

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *