    /**
     * واکشی تصویر رسید با تکنیک سازگار با ACF + HPOS
     */
    private static function get_receipt_image_url($order): string {
        if (is_numeric($order)) {
            $order = wc_get_order($order);
        }
        if (!$order instanceof WC_Order) {
            return '';
        }

        $oid = $order->get_id();
        $raw = '';
        $field_key = 'field_6a15328177aaa';

        // ۱. واکشی مستقیم از ACF با کلید فیلد اختصاصی و نام فیلد در HPOS
        if (function_exists('get_field')) {
            $raw = get_field($field_key, 'woo_order_' . $oid);
            if (empty($raw)) {
                $raw = get_field('peyk_receipt_img', 'woo_order_' . $oid);
            }
            if (empty($raw)) {
                $raw = get_field($field_key, $oid);
            }
            if (empty($raw)) {
                $raw = get_field('peyk_receipt_img', $oid);
            }
        }

        // ۲. واکشی مستقیم از متای سفارش ووکامرس
        if (empty($raw)) {
            $raw = $order->get_meta('peyk_receipt_img', true);
        }
        if (empty($raw)) {
            $raw = $order->get_meta($field_key, true);
        }

        // ۳. کوئری مستقیم به جدول متا سفارشات ووکامرس (HPOS)
        if (empty($raw)) {
            global $wpdb;
            $raw = $wpdb->get_var($wpdb->prepare(
                "SELECT meta_value FROM {$wpdb->prefix}wc_orders_meta 
                 WHERE order_id = %d AND (meta_key = 'peyk_receipt_img' OR meta_key = %s) 
                 ORDER BY id DESC LIMIT 1",
                $oid,
                $field_key
            ));
        }

        // ۴. متای سنتی وردپرس (در صورت فال‌بک)
        if (empty($raw)) {
            $raw = get_post_meta($oid, 'peyk_receipt_img', true);
            if (empty($raw)) {
                $raw = get_post_meta($oid, $field_key, true);
            }
        }

        return self::extract_url($raw);
    }
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://kooshanic.com/wp-content/plugins/slim-seo/src/Sitemaps/style.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://kooshanic.com/sitemap-post-type-page.xml</loc>
	</sitemap>
	<sitemap>
		<loc>https://kooshanic.com/sitemap-post-type-product.xml</loc>
	</sitemap>
	<sitemap>
		<loc>https://kooshanic.com/sitemap-post-type-product-2.xml</loc>
	</sitemap>
	<sitemap>
		<loc>https://kooshanic.com/sitemap-post-type-product-3.xml</loc>
	</sitemap>
	<sitemap>
		<loc>https://kooshanic.com/sitemap-post-type-seo_filter_page.xml</loc>
	</sitemap>
	<sitemap>
		<loc>https://kooshanic.com/sitemap-taxonomy-product_cat.xml</loc>
	</sitemap>
	<sitemap>
		<loc>https://kooshanic.com/sitemap-taxonomy-product_brand.xml</loc>
	</sitemap>
</sitemapindex>