/** * Razor Ghor — Custom WooCommerce Thank You (order-received) page. * $order is provided by the including scope (razorghor_thankyou_template_redirect). * Bypasses the theme's header/footer chrome entirely (matches the landing * page's own minimal, funnel-focused style) while still calling wp_head()/ * wp_footer() so every plugin hook (PixelYourSite's Purchase pixel + server * Conversions API, analytics, etc.) fires exactly as it would on any normal * WooCommerce order-received page. */ if (!defined('ABSPATH')) { exit; } if (!isset($order) || !($order instanceof WC_Order)) { return; } if (!function_exists('razorghor_ty_bn_digits')) { function razorghor_ty_bn_digits($n) { $map = ['0'=>'০','1'=>'১','2'=>'২','3'=>'৩','4'=>'৪','5'=>'৫','6'=>'৬','7'=>'৭','8'=>'৮','9'=>'৯']; return strtr(number_format((float) $n, 0, '.', ','), $map); } } $items = $order->get_items(); $first_item = $items ? reset($items) : null; $package_name = $first_item ? $first_item->get_name() : ''; $order_number = $order->get_order_number(); $ship_cost = razorghor_ty_bn_digits($order->get_shipping_total()); $total = razorghor_ty_bn_digits($order->get_total()); ?>