id, 'wc-settings') !== false) ? true : false; } /** * Debug * * @param $args * @param bool $title */ function woo_ml_debug($args, $title = false) { if ($title) { echo '

' . $title . '

'; } echo '
';
    print_r($args);
    echo '
'; } /** * Debug to log file * * @param $message */ function woo_ml_debug_log($message) { if (WP_DEBUG === true && defined('WOO_ML_DEBUG') && WOO_ML_DEBUG === true) { if (is_array($message) || is_object($message)) { error_log(print_r($message, true)); } else { error_log($message); } } } /** * MailerLite universal script for tracking visits * @return void */ function mailerlite_universal_woo_commerce() { require_once WOO_MAILERLITE_DIR . 'includes/shared/api/class.woo-mailerlite-api-type.php'; if ((int)get_option('woo_mailerlite_platform', 1) === ApiType::CLASSIC) { $shopUrl = home_url(); $shopUrl = str_replace('http://', '', $shopUrl); $shopUrl = str_replace('https://', '', $shopUrl); $popups_enabled = !get_option('mailerlite_popups_disabled'); $load = ''; if ($popups_enabled) { $load = 'load'; } ?>