Uncheck Show New Member Dashboard Permanently
add_filter(‘show_admin_bar’, ‘__return_false’);Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter(‘show_admin_bar’, ‘__return_false’);Continue reading
/** * FRS Work Order SLA Stats (by Days to Complete) + SLA Score * Shortcode: [frs_wo_sla_stats] * * Buckets CLOSED work orders by their Days to Complete value * and calculates an SLA score based on 0–7 day completions.…Continue reading
/** * FRS Work Orders per Month (Last 12 Months) * Shortcode: [frs_wo_monthly_counts] * * Shows a bar chart of CLOSED work orders by Completed Date month * with a single blue color family in progressively darker shades. */ add_shortcode(‘frs_wo_monthly_counts’,…Continue reading
/** * Plugin Name: Proceso de Orla (CPT + Estado + Notificaciones) * Description: CPT “Proceso de Orla” con fase por grado (1–6), timeline por rol con iconos, notificaciones por lotes, reenvío, quick edit, seeder, fase 1 por defecto y…Continue reading
add_action( ‘pre_get_posts’, function ( WP_Query $query ) { // Only affect frontend main product queries (shop, category, etc.) if ( is_admin() || ! $query->is_main_query() || ‘product’ !== $query->get( ‘post_type’ ) ) { return; } $user_id = get_current_user_id(); // Admins /…Continue reading
function defer_some_scripts($tag, $handle, $src) { $is_hcaptcha_script = str_starts_with( $handle, ‘hcaptcha’ ); $is_callrail_swap_script = str_starts_with( $handle, ‘swapjs’); $should_defer = $is_hcaptcha_script || $is_callrail_swap_script; if ( $should_defer ) { $tag = str_replace(‘>‘, ‘ defer>‘, $tag); } return $tag; } add_filter(‘script_loader_tag’, ‘defer_some_scripts’, 10, 3);Continue reading
function modify_woocommerce_order_response( $response, $order, $request ) { if ( is_a( $order, ‘WC_Order’ ) ) { $data = $response->get_data(); $data[‘wc_id’] = $data[‘id’]; $data[‘id’] = intval($order->get_order_number()); $response->set_data( $data ); } return $response; } add_filter( ‘woocommerce_rest_prepare_shop_order_object’, ‘modify_woocommerce_order_response’, 10, 3 );Continue reading
/** * Plugin Name: WC REST: Update Order by Shopify Order Number * Description: Aggiunge un endpoint REST per aggiornare un ordine partendo dal meta shopify_order_number. * Author: You * Version: 1.0.0 */ if ( ! defined( ‘ABSPATH’ ) )…Continue reading
add_filter( ‘woocommerce_rest_prepare_shop_order_object’, ‘modify_order_response_add_shopify_coupons’, 10, 3 ); function modify_order_response_add_shopify_coupons( $response, $order, $request ) { // Fetch the meta data from the order $shopify_coupons = $order->get_meta( ‘shopify_coupons’ ); // Add the meta data to the coupon_lines in the response if ( !…Continue reading
/** * Compliance Calendar – Cron Jobs (Overdue Detection) * Checks for overdue compliance items and sends notifications via GHL webhook * * @package BHA_Portal * @subpackage Compliance_Calendar * @version 6.1 * * WPCODE SETTINGS: * – Location: Run Everywhere…Continue reading