Remove shipping from completed order

add_action(‘init’, function() { if (!is_admin()) return; $order_id = 65588; // Replace this with the actual order ID $order = wc_get_order($order_id); if (!$order) { error_log(“Order $order_id not found.”); return; } $removed = []; foreach ($order->get_items(‘shipping’) as $item_id => $item) { $method_id…Continue reading

Adjust Owl carousel for mobile books view

add_action(‘wp_enqueue_scripts’, function () { // This runs after the theme’s main script (theme-js) to override Owl Carousel config wp_add_inline_script(‘theme-js’, ” jQuery(window).on(‘load’, function () { var \$carousel = jQuery(‘.featured-products ul.products’); if (\$carousel.length && \$carousel.data(‘owl.carousel’)) { // Destroy the existing Owl instance…Continue reading

GravityView_DIR_AC_SYNC_GravityView Sync System

/** * WPCode Snippet: GravityView Sync System – MANUAL SYNC ONLY (FIXED) * Description: Syncs GravityView configurations to custom post type * Location: Run Everywhere * Priority: 20 * * ⚠️ AUTO-SYNC DISABLED – Manual sync only via admin bar…Continue reading

GravityView_DIR_AB_ACF – GravityView Views ACF Fields

/** * WPCode Snippet: GravityView Views ACF Fields * Description: Registers ACF fields for GravityView configurations and settings * Location: Run Everywhere * Priority: 10 */ defined( ‘ABSPATH’ ) || exit; add_action( ‘acf/init’, function() { if ( ! function_exists( ‘acf_add_local_field_group’…Continue reading

Global – Shortcode pa_merk overzichtspagina

function shortcode_merken_logos() { // Probeer eerst ‘pa_brand’ $terms = get_terms(array( ‘taxonomy’ => ‘pa_brand’, ‘hide_empty’ => false, )); // Als ‘pa_brand’ leeg is of niet bestaat, gebruik ‘pa_merk’ if (empty($terms) || is_wp_error($terms)) { $terms = get_terms(array( ‘taxonomy’ => ‘pa_merk’, ‘hide_empty’ =>…Continue reading

Global – String translations

// Forceer aangepaste vertalingen met ondersteuning voor NL / EN / DE function translated_text_strings( $translated_text, $text, $domain ) { // Haal de huidige site-taal op (bv. ‘nl_NL’, ‘en_US’, ‘de_DE’) $locale = get_locale(); switch ( $translated_text ) { // Algemene WooCommerce…Continue reading

Redirect Desktop URLs on Mobile

// This snippet ONLY runs on MOBILE devices. // It checks if the user is on a desktop page and sends them to the mobile version. add_action( ‘template_redirect’, function() { // — Define your page pairs — // ‘desktop_page_slug’ =>…Continue reading