const DEBUG_SKINGURU24_SEO=false; /* * Urmatoarea functie doar pentru benchmarking snippet ul in dev process ( unused in prod ) */ function my_woocommerce_log_message($message) { if (class_exists(‘WC_Logger’)) { $logger = wc_get_logger(); $caller_function=”UNKNOWN”; $backtrace = debug_backtrace(); if (isset($backtrace[1])) { // The caller is…Continue reading
function custom_urls_preload ( $urls ){ try { $language_code = substr(get_locale(),0,2); $api_url = ‘https://app-hintz.bbbone.biz/server/skinguru24/permalink_variations/’.$language_code; // Fetch the JSON data from the remote API $response = wp_remote_get($api_url); // Check for errors in the response if (is_wp_error($response)) { throw new Exception(‘API request failed:…Continue reading
function widget_print_order_content_silent_print(WC_Order $order) { if (!is_a($order, ‘WC_Order’)) { return; } if (in_array($order->get_status(), [‘cancelled’, ‘refunded’, ‘failed’])) { return; } $order_id = $order->get_id(); $admin_url = admin_url(‘admin-post.php?action=generate_order_content_pdf&order_id=’ . esc_attr($order_id)); // Using Heredoc syntax for HTML output $output =Continue reading
add_action(‘wp_head’, function () { if (is_page(‘conference-organizer-in-chiang-mai’)) { ?>Continue reading
/** * This API allows you to create your own “shortcodes” which you can add to label templates * and they will be replaced with values you fetch in api.php * Follow the documentation here: https://www.ukrsolution.com/Wordpress/Print-Barcode-Labels-for-WooCommerce-Products#details */ /******************************** * Add…Continue reading
add_action(‘wp_head’, function () { if (is_page(‘conference-management-services’)) { ?>Continue reading
add_action(‘wp_head’, function () { if (is_page(‘clients-testimonials’)) { ?>Continue reading
/* * https://developer.woocommerce.com/docs/cart-and-checkout-removing-checkout-fields/ * for example following is not really required for PL because if you check the $locale for PL it is like : {“PL”:{“postcode”:{“priority”:65},”state”:{“required”:false,”hidden”:true}}} … but for the BG & HU is already require=false but its not hidden=true…Continue reading
add_action(‘wp_head’, function () { if (is_page(‘branding-and-marketing-for-events’)) { ?>Continue reading
add_action(‘rest_api_init’, function () { register_rest_route(‘sg24tothemoon/v1’, ‘/completed-orders’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘get_recently_completed_orders_json’, ‘permission_callback’ => ‘__return_true’, // Adjust this for security in production )); }); function get_recently_completed_orders_json(WP_REST_Request $request) { global $wpdb; // Access the global WordPress database object $hours =…Continue reading