Enabled product bundles

This commit is contained in:
Nedim Uka
2018-06-29 14:40:28 +02:00
parent e0514f7f57
commit b5475ff2f1
12004 changed files with 1694047 additions and 1610 deletions

View File

@@ -0,0 +1,38 @@
<?php
/**
* Booster for WooCommerce - Functions - Debug
*
* @version 3.5.0
* @author Algoritmika Ltd.
*/
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! function_exists( 'wcj_log' ) ) {
/**
* wcj_log.
*
* @version 3.5.0
*/
function wcj_log( $message = '', $do_var_dump = false ) {
if ( ! wcj_is_module_enabled( 'admin_tools' ) || ( 'no' === get_option( 'wcj_logging_enabled', 'no' ) && 'no' === get_option( 'wcj_wc_logging_enabled', 'no' ) ) ) {
return;
}
if ( $do_var_dump ) {
ob_start();
var_dump( $message );
$message = ob_get_clean();
} elseif ( is_array( $message ) || is_object( $message ) ) {
$message = print_r( $message, true );
}
if ( 'yes' === get_option( 'wcj_logging_enabled', 'no' ) ) {
update_option( 'wcj_log', date( 'Y-m-d H:i:s' ) . ' ' . esc_url( $_SERVER['REQUEST_URI'] ) . ' [' . $message . ']' . '<br>' . get_option( 'wcj_log', '' ) );
}
// WC log
if ( 'yes' === get_option( 'wcj_wc_logging_enabled', 'no' ) && function_exists( 'wc_get_logger' ) ) {
if ( $log = wc_get_logger() ) {
$log->log( 'info', $message, array( 'source' => 'booster_for_woocommerce' ) );
}
}
}
}