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,’online’,isset($_POST[‘online’]) ? 1 : 0); update_user_meta($user_id,’kampanya’,sanitize_text_field($_POST[‘kampanya’])); update_user_meta($user_id,’nobetci’,isset($_POST[‘nobetci’]) ? 1 : 0); echo “ Kaydedildi “; } $firma = get_user_meta($user_id,’firma’,true); $hizmet…Continue reading

Rutplan Yeni Esnaf Giriş

/** * Plugin Name: RUTPLAN – Yeni Esnaf Giriş * Description: Telefon + PIN tabanlı yeni esnaf giriş/kayıt sistemi. Shortcode: [rutplan_yeni_giris] * Version: 1.0.0 * Author: OpenAI */ if (!defined(‘ABSPATH’)) exit; define(‘RP_NG_COOKIE’, ‘rp_device_token’); define(‘RP_NG_REDIRECT’, ‘/esnaf-panel’); function rp_ng_normalize_phone($phone) { $phone =…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