met checkout redirection

add_action(‘init’, function () { add_rewrite_rule(‘^meta-checkout/?$’, ‘index.php?meta_checkout=1’, ‘top’); }); add_filter(‘query_vars’, function ($vars) { $vars[] = ‘meta_checkout’; return $vars; }); add_action(‘template_redirect’, function () { if (!get_query_var(‘meta_checkout’)) { return; } if (!function_exists(‘WC’) || !WC()->cart) { return; } // Clear current cart so Meta…Continue reading

YENİ PANEL

add_shortcode(‘rutplan_yeni_panel’, function(){ if (!is_user_logged_in()) { return ‘ Giriş yapmanız gerekiyor. ‘; } $user_id = get_current_user_id(); if(isset($_POST[‘rp_kaydet’])){ update_user_meta($user_id,’firma’,sanitize_text_field($_POST[‘firma’])); update_user_meta($user_id,’hizmet’,sanitize_text_field($_POST[‘hizmet’])); update_user_meta($user_id,’aciklama’,sanitize_textarea_field($_POST[‘aciklama’])); update_user_meta($user_id,’telefon’,sanitize_text_field($_POST[‘telefon’])); update_user_meta($user_id,’kampanya’,sanitize_text_field($_POST[‘kampanya’])); update_user_meta($user_id,’nobetci’,isset($_POST[‘nobetci’]) ? 1 : 0); // Durum seçimi: online / offline $durum = isset($_POST[‘durum’]) ? sanitize_text_field($_POST[‘durum’]) : ‘offline’; update_user_meta($user_id,’online’,…Continue reading

Esnaf Giriş

function rp_ng_handle_request() { $state = [ ‘screen’ => ‘start’, ‘phone’ => ”, ‘message’ => ”, ‘type’ => ‘error’, ]; // Form gönderilmediyse başlangıç ekranı if ($_SERVER[‘REQUEST_METHOD’] !== ‘POST’ || !isset($_POST[‘rp_ng_action’])) { return $state; } // Nonce kontrolü if ( !isset($_POST[‘rp_ng_nonce’])…Continue reading

Security Icons for Cart Page

/** * ============================================================ * Cart Page — Security Trust Badge Bar * ============================================================ * * PURPOSE: Adds a clean trust badge row below the “Proceed to * Checkout” button on the cart page to increase * conversion confidence. * *…Continue reading

Untitled Snippet

function youtube_dashboard() { $api_key = “AIzaSyBzzf22Vs5sMf1eoCuhN3-0Qtnj0EKu7Bk”; $channel_id = “102319916649-hmjdaecid7f96ql384nd80ie8mn13fjj.apps.googleusercontent.com”; // ganti channel kamu $url = “https://www.googleapis.com/youtube/v3/channels?part=snippet,statistics&id=$channel_id&key=$api_key”; $response = wp_remote_get($url); if (is_wp_error($response)) { return “Error ambil data”; } $body = json_decode(wp_remote_retrieve_body($response), true); $data = $body[‘items’][0]; $title = $data[‘snippet’][‘title’]; $subs = $data[‘statistics’][‘subscriberCount’];…Continue reading

Delete Double Logo At Checkout

/** * ============================================================ * Hide Duplicate Astra Header on Checkout * ============================================================ * * PURPOSE: Hides the default Astra #masthead header and the * gray shadow box around the checkout page title. * Spectra-built custom header remains visible. * *…Continue reading