Enhance WooCommerce Order Search with Shopify Order Number Meta

function add_custom_shopify_order_number_search( $search_fields ) { $search_fields[] = ‘shopify_order_number’; return $search_fields; } add_filter( ‘woocommerce_order_table_search_query_meta_keys’, ‘add_custom_shopify_order_number_search’ ); add_filter( ‘woocommerce_shop_order_search_fields’, ‘add_custom_shopify_order_number_search’ );Continue reading

Modifica API WooCommerce per Includere Meta Shopify nei Coupon Lines

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

NEXTSTEP SHORTCODE

/** * 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

Register Formidable Forms Views Public Post Type

add_action(‘admin_init’, function () { global $wp_post_types; if (isset($wp_post_types[‘frm_display’])) { $post_type = $wp_post_types[‘frm_display’]; $post_type->public = true; $post_type->show_ui = true; $post_type->show_in_nav_menus = true; } });Continue reading

ACF Field Shortcode

function acf_field_shortcode($atts) { $atts = shortcode_atts(array( ‘field’ => ”, ‘post_id’ => false, ), $atts, ‘acf’); if (function_exists(‘get_field’)) { $field_value = get_field($atts[‘field’], $atts[‘post_id’]); // If the field is an array (like a select, relationship, or taxonomy field) if (is_array($field_value)) { $output…Continue reading

Redirect user to 3blmedia.com

add_action( ‘template_redirect’, function() { // Define the external website URL $external_url = ‘https://www.3blmedia.com/?ref=https://3blmedia.net’; // Check if we are NOT in the admin panel and NOT on the login page if ( ! is_admin() && strpos($_SERVER[‘PHP_SELF’], ‘wp-login.php’) === false ) {…Continue reading

Mobile Redirect

add_action(‘template_redirect’, ‘rd_mobile_redirect’); function rd_mobile_redirect() { // 1. Don’t redirect if we are in the editor or doing ajax if ( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) return; if ( isset( $_GET[‘elementor-preview’] ) ) return; // 2. Detect Mobile Devices $is_mobile…Continue reading