Show ‘NEW’ Badges for Recently Added Items in WooCommerce (copy)

/** * Snippet Name: Show ‘NEW’ Badges for Recently Added Items in WooCommerce * Snippet Author: wdxtechnologies.com */ // Show the NEW badge on the archive loop item add_action( ‘woocommerce_after_shop_loop_item_title’, ‘ecommercehints_product_archive_new_badge’, 1 ); function ecommercehints_product_archive_new_badge() { global $product; $days_to_show =…Continue reading

Oh Dear Health

add_action(‘init’, function () { add_rewrite_rule(‘^oh-dear-health/?$’, ‘index.php?health_check=1’, ‘top’); add_rewrite_tag(‘%health_check%’, ‘1’); }); add_action(‘template_redirect’, function () { if (get_query_var(‘health_check’) == ‘1’) { /* $token = $_GET[‘token’] ?? ”; if ($token !== ‘ma_clé_super_secrète’) { status_header(403); echo json_encode([‘error’ => ‘Unauthorized’]); exit; } */ header(‘Content-Type: application/json’);…Continue reading

Products Fields / Herbalife / JetEngine

add_filter( ‘woocommerce_product_tabs’, ‘custom_product_meta_fields_tab’ ); function custom_product_meta_fields_tab( $tabs ) { $tabs[‘meta_fields_tab’] = array( ‘title’ => __( ‘Λεπτομέρειες Προϊόντος’, ‘woocommerce’ ), ‘priority’ => 15, ‘callback’ => ‘custom_product_meta_fields_content’ ); return $tabs; } function custom_product_meta_fields_content() { global $post; $systatika = get_post_meta( $post->ID, ‘systatika’, true…Continue reading