if ( ! function_exists( ‘rd_currency_switcher_shortcode’ ) ) { function rd_currency_switcher_shortcode( $atts ) { if ( ! function_exists( ‘wc_get_currency_switcher_markup’ ) ) { return ”; } // Attributes (defaults) $atts = shortcode_atts( array( ‘flag’ => ‘true’, ‘symbol’ => ‘true’, ‘select_border’ => ‘true’,…Continue reading
.header-inner { transition: background-color 1.0s ease; /* Define uma transição suave para a cor de fundo */ } .stuck .header-main { background-color: #fff; border: none; } .stuck #logo img { max-height: 50px !important; } .logo img { padding: 10px !important;…Continue reading
if ( class_exists( ‘WooCommerce’ ) ) { add_filter( ‘gettext’, ‘rd_wc_generic_coupon_replacement’, 20, 3 ); add_filter( ‘ngettext’, ‘rd_wc_generic_coupon_replacement_plural’, 20, 5 ); // Also replace wording directly in notices (covers cases where text bypasses gettext later) add_filter( ‘woocommerce_add_notice’, ‘rd_wc_generic_coupon_replacement_in_notice’, 20, 1 ); add_filter(…Continue reading
if ( class_exists( ‘WooCommerce’ ) ) { // Run after RD renaming snippet (in case enabled) add_filter( ‘gettext’, ‘rd_wc_coupon_text_overrides’, 30, 3 ); function rd_wc_coupon_text_overrides( $translated, $original, $domain ) { if ( is_admin() ) { return $translated; } if ( !…Continue reading
function rosso_woocommerce_checkout_terms_and_conditions() { if ( ! class_exists( ‘WooCommerce’ ) ) { return; } remove_action( ‘woocommerce_checkout_terms_and_conditions’, ‘wc_terms_and_conditions_page_content’, 30 ); } add_action( ‘wp’, ‘rosso_woocommerce_checkout_terms_and_conditions’ );Continue reading
if ( class_exists( ‘WooCommerce’ ) ) { add_action( ‘template_redirect’, function() { if ( ! WC()->cart ) { return; } if ( isset( $_GET[‘clear-cart’] ) && $_GET[‘clear-cart’] === ‘true’ ) { WC()->cart->empty_cart(); wp_safe_redirect( remove_query_arg( ‘clear-cart’ ) ); exit; } if (…Continue reading
if ( ! class_exists( ‘WooCommerce’ ) ) { return; } add_filter( ‘woocommerce_shipping_fields’, ‘rd_add_shipping_phone_field’ ); function rd_add_shipping_phone_field( $fields ) { $fields[‘shipping_phone’] = array( ‘label’ => __( ‘Phone (For Delivery Tracking SMS)’, ‘woocommerce’ ), ‘required’ => false, // Change to ‘true’ if…Continue reading
if ( class_exists( ‘WooCommerce’ ) ) { add_filter( ‘woocommerce_ship_to_different_address_checked’, function ( $checked ) { $checkout = WC()->checkout(); if ( ! $checkout ) { return $checked; } // Check if the shipping address has already been entered $shipping_first = $checkout->get_value( ‘shipping_first_name’…Continue reading