add_filter( ‘woocommerce_coupon_is_valid’, function( $valid, $coupon, $discount ) { $excluded_channels = $coupon->get_meta( ‘_excluded_og_channels’, true ); if ( empty( $excluded_channels ) ) { return $valid; } // Handle both a single stored string and a serialized array if ( ! is_array( $excluded_channels…Continue reading
function convert_to_webp($file) { $file_path = $file[‘file’]; $file_type = $file[‘type’]; // Only for JPEG, PNG, and GIF images if (in_array($file_type, [‘image/jpeg’, ‘image/png’, ‘image/gif’, ‘image/jpg’])) { $webp_path = preg_replace(‘/.(jpe?g|png|gif)$/i’, ‘.webp’, $file_path); // Check if the GD library is available if (!function_exists(‘gd_info’)) {…Continue reading
QaraBulaq – Демалыс орны | Аламедин ⚡ QaraBulaq Тау бөктеріндегі жанұялық демалыс орны “>🏡 ДЕМАЛЫС ОРЫНДАРЫContinue reading
{ “data”: [ { “action_source”: “system_generated”, “custom_data”: { “event_source”: “crm”, “lead_event_source”: “Your CRM” }, “event_name”: “Lead”, “event_time”: 1673035686, “user_data”: { “em”: [ “7b17fb0bd173f625b58636fb796407c22b3d16fc78302d79f0fd30c2fc2fc068” ], “lead_id”: 1234567890123456, “ph”: [ “6069d14bf122fdfd931dc7beb58e5dfbba395b1faf05bdcd42d12358d63d8599” ] } } ] }Continue reading
add_filter( ‘woocommerce_countries_tax_or_vat’, function( $label ) { if ( ! ( is_cart() || is_checkout() ) ) { return $label; } global $wc_wholesale_prices_premium; $user_wholesale_role = $wc_wholesale_prices_premium->wwpp_wholesale_roles->getUserWholesaleRole(); if ( empty( $user_wholesale_role ) ) { return $label; } return ”; // Leave blank, or…Continue reading
/** * WWPP & Elementor: show correct wholesale prices in Elementor side cart. */ add_filter( ‘woocommerce_cart_item_price’, function ( $price_html, $cart_item, $cart_item_key ) { if ( is_cart() || is_checkout() ) { return $price_html; } global $wc_wholesale_prices_premium, $wc_wholesale_prices; if ( ! isset(…Continue reading
/** * Route logout through home URL to prevent exposing the hidden login path. */ add_filter( ‘logout_url’, function ( $logout_url, $redirect ) { $redirect_to = $redirect ?: home_url( ‘/’ ); return add_query_arg( [ ‘do_logout’ => ‘1’, ‘_wpnonce’ => wp_create_nonce( ‘safe-logout’…Continue reading