

// --- AquaCare Service Request Code ---

function register_aquacare_service_types() {
    register_post_type('installation', array(
        'labels' => array(
            'name' => 'Installations',
            'singular_name' => 'Installation'
        ),
        'public' => false,
        'show_ui' => true,
        'menu_icon' => 'dashicons-admin-tools',
        'supports' => array('title', 'editor')
    ));

    register_post_type('repair', array(
        'labels' => array(
            'name' => 'Repair Services',
            'singular_name' => 'Repair Service'
        ),
        'public' => false,
        'show_ui' => true,
        'menu_icon' => 'dashicons-hammer',
        'supports' => array('title', 'editor')
    ));
}
add_action('init', 'register_aquacare_service_types');

function save_aquacare_service_request() {
    if (isset($_POST['name']) && isset($_POST['phone'])) {
        
        $service_type = sanitize_text_field($_POST['service_type']);
        $name         = sanitize_text_field($_POST['name']);
        $phone        = sanitize_text_field($_POST['phone']);
        $address      = sanitize_textarea_field($_POST['address']);
        $pincode      = sanitize_text_field($_POST['pincode']);
        $issue        = isset($_POST['issue']) ? sanitize_text_field($_POST['issue']) : 'N/A';

        $post_type = ($service_type == 'installation') ? 'installation' : 'repair';

        $post_title = $name . ' - ' . $phone;

        $post_content  = "Customer Name: " . $name . "\n";
        $post_content .= "Phone Number: " . $phone . "\n";
        post_content .= "Address: " . $address . "\n";
        $post_content .= "Pincode: " . $pincode . "\n";
        if ($service_type == 'other') {
            $post_content .= "Issue / Problem: " . $issue . "\n";
        }

        $new_request = array(
            'post_title'   => $post_title,
            'post_content' => $post_content,
            'post_type'    => $post_type,
            'post_status'  => 'publish'
        );

        wp_insert_post($new_request);

        wp_redirect(home_url('/book-service/?success=1'));
        exit;
    }
}
add_action('admin_post_nopriv_save_service_request', 'save_aquacare_service_request');
add_action('admin_post_save_service_request', 'save_aquacare_service_request');<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//aquaro.in/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://aquaro.in/post-sitemap.xml</loc>
		<lastmod>2026-03-21T06:35:27+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://aquaro.in/page-sitemap.xml</loc>
		<lastmod>2026-07-24T07:46:26+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://aquaro.in/product-sitemap.xml</loc>
		<lastmod>2026-07-21T08:42:45+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://aquaro.in/ts_footer_block-sitemap.xml</loc>
		<lastmod>2026-03-05T04:11:11+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://aquaro.in/ts_mega_menu-sitemap.xml</loc>
		<lastmod>2024-08-24T16:53:40+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://aquaro.in/ufaq-sitemap.xml</loc>
		<lastmod>2026-02-28T12:33:36+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://aquaro.in/category-sitemap.xml</loc>
		<lastmod>2026-03-21T06:35:27+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://aquaro.in/post_tag-sitemap.xml</loc>
		<lastmod>2026-03-03T06:10:13+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://aquaro.in/product_cat-sitemap.xml</loc>
		<lastmod>2026-07-21T08:42:45+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://aquaro.in/ts_logo_cat-sitemap.xml</loc>
		<lastmod>2024-08-03T15:24:50+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://aquaro.in/author-sitemap.xml</loc>
		<lastmod>2025-08-22T08:34:22+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->