{"id":356,"date":"2026-05-05T09:02:58","date_gmt":"2026-05-05T09:02:58","guid":{"rendered":"https:\/\/happybuying.shop\/?page_id=356"},"modified":"2026-05-08T15:15:27","modified_gmt":"2026-05-08T15:15:27","slug":"pet","status":"publish","type":"page","link":"https:\/\/happybuying.shop\/pl\/pet\/","title":{"rendered":"Pet"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"356\" class=\"elementor elementor-356\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-34bdba6 e-flex e-con-boxed e-con e-parent\" data-id=\"34bdba6\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;ekit_has_onepagescroll_dot&quot;:&quot;yes&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8c00d80 elementor-widget elementor-widget-html\" data-id=\"8c00d80\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;ekit_we_effect_on&quot;:&quot;none&quot;}\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n  <meta charset=\"UTF-8\">\r\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n  <title>Category  Pet Care  SparkNest<\/title>\r\n  <link rel=\"stylesheet\" href=\"page.css\">\r\n<\/head>\r\n<body class=\"wf-body\" data-category-name=\"Pet Care\">\r\n  <main class=\"wf-main wf-main--wide\">\r\n    <div class=\"wf-page-heading\"><h1>Category  Pet Care<\/h1><\/div>\r\n    <div class=\"layout-archive\">\r\n    <aside class=\"layout-archive__sidebar\" aria-label=\"Filters\">\r\n      <h2 class=\"layout-archive__sidebar-title\">Filters<\/h2>\r\n      <nav class=\"layout-archive__filters\">\r\n        <p class=\"layout-archive__filter-head\">Category<\/p>\r\n        <ul>\r\n          <li><a href=\"beauty\">Beauty<\/a><\/li>\r\n          <li><a href=\"car\">Car<\/a><\/li>\r\n          <li><a href=\"crafts\">Crafts<\/a><\/li>\r\n          <li><a href=\"electronics\">Electronics<\/a><\/li>\r\n          <li><a href=\"fitness\">Fitness<\/a><\/li>\r\n          <li><a href=\"gifting\">Gifting<\/a><\/li>\r\n          <li><a href=\"kitchen\">Kitchen<\/a><\/li>\r\n          <li><a href=\"laundry\">Laundry<\/a><\/li>\r\n          <li><a href=\"new-in\">New in<\/a><\/li>\r\n          <li><a href=\"party\">Party<\/a><\/li>\r\n          <li><a href=\"pet\">Pet Care<\/a><\/li>\r\n          <li><a href=\"seasonal\">Seasonal<\/a><\/li>\r\n          <li><a href=\"snacks\">Snacks<\/a><\/li>\r\n          <li><a href=\"stationery\">Stationery<\/a><\/li>\r\n          <li><a href=\"storage\">Storage<\/a><\/li>\r\n          <li><a href=\"toys\">Toys<\/a><\/li>\r\n          <li><a href=\"travel\">Travel<\/a><\/li>\r\n          <li><a href=\"departments\">All categories<\/a><\/li>\r\n        <\/ul>\r\n        <p class=\"layout-archive__filter-head\">Price<\/p>\r\n        <ul>\r\n          <li><a href=\"hot-deals\">Under $15<\/a><\/li>\r\n          <li><a href=\"deal-zone\">Deal Zone<\/a><\/li>\r\n        <\/ul>\r\n      <\/nav>\r\n    <\/aside>\r\n      <div class=\"layout-archive__main\">\r\n        <h2 class=\"layout-archive__heading\">Featured products<\/h2>\r\n        <p class=\"layout-archive__lead\">Products Archive Filters + Loop Item <\/p>\r\n        <div class=\"loop-grid\" role=\"list\">\r\n          <!-- Backend products render here -->\r\n        <\/div>\r\n        \r\n      <\/div>\r\n    <\/div>\r\n  <\/main>\r\n  <script>\r\n(() => {\r\n  const API_ROOT = `${window.location.origin}\/wp-json\/wc\/store\/v1`;\r\n  const PRODUCT_LIMIT = 12;\r\n  const productIdLookupCache = Object.create(null);\r\n  let activeCategoryId = null;\r\n  let activePage = 1;\r\n  let lastPageCount = 0;\r\n  let activeOrderBy = \"date\";\r\n  let activeOrder = \"desc\";\r\n\r\n  const SORT_PRESETS = {\r\n    newest: { orderby: \"date\", order: \"desc\" },\r\n    price_asc: { orderby: \"price\", order: \"asc\" },\r\n    price_desc: { orderby: \"price\", order: \"desc\" },\r\n    popularity: { orderby: \"popularity\", order: \"desc\" },\r\n  };\r\n\r\n  const applySortPreset = (key) => {\r\n    const preset = SORT_PRESETS[key] || SORT_PRESETS.newest;\r\n    activeOrderBy = preset.orderby;\r\n    activeOrder = preset.order;\r\n  };\r\n\r\n  const norm = (value) =>\r\n    String(value || \"\")\r\n      .toLowerCase()\r\n      .trim()\r\n      .replace(\/&\/g, \" and \")\r\n      .replace(\/[^a-z0-9]+\/g, \"-\")\r\n      .replace(\/^-+|-+$\/g, \"\");\r\n\r\n  const money = (cents, currency) => {\r\n    const value = Number(cents || 0) \/ 100;\r\n    if (!Number.isFinite(value)) return \"\";\r\n    try {\r\n      return new Intl.NumberFormat(undefined, {\r\n        style: \"currency\",\r\n        currency: currency || \"USD\",\r\n      }).format(value);\r\n    } catch {\r\n      return `$${value.toFixed(2)}`;\r\n    }\r\n  };\r\n\r\n  const categoryNameFromPage = () => {\r\n    const fromData = document.body?.dataset?.categoryName;\r\n    if (fromData) return fromData.trim();\r\n    const h1 = document.querySelector(\"h1\");\r\n    if (!h1) return \"\";\r\n    return h1.textContent.replace(\/^category\\s+\/i, \"\").trim();\r\n  };\r\n\r\n  const buildFallbackSlug = (name) => norm(name);\r\n\r\n  const setCount = (count) => {\r\n    const countSlot = document.querySelector(\".newin-toolbar__meta span\");\r\n    if (countSlot) countSlot.textContent = `${count} products`;\r\n  };\r\n\r\n  const renderStatus = (message) => {\r\n    const newInGrid = document.querySelector(\".newin-grid\");\r\n    if (newInGrid) {\r\n      newInGrid.innerHTML = `<article class=\"newin-card\" role=\"listitem\"><div class=\"newin-card__body\"><h3>${message}<\/h3><\/div><\/article>`;\r\n      setCount(0);\r\n      return true;\r\n    }\r\n    const loopGrid = document.querySelector(\".loop-grid\");\r\n    if (loopGrid) {\r\n      loopGrid.innerHTML = `<article class=\"loop-card\" role=\"listitem\"><div class=\"loop-card__body\"><h3 class=\"loop-card__title\">${message}<\/h3><\/div><\/article>`;\r\n      return true;\r\n    }\r\n    return false;\r\n  };\r\n\r\n  const isLocalHtmlHref = (href) => !!href && \/\\.html(?:[#?].*)?$\/i.test(href) && !\/^https?:\\\/\\\/\/i.test(href);\r\n\r\n  const getStoreApiNonce = () => {\r\n    if (window.wc?.wcSettings?.storeApiNonce) return window.wc.wcSettings.storeApiNonce;\r\n    if (window.wcSettings?.storeApiNonce) return window.wcSettings.storeApiNonce;\r\n    if (window.wc_store_api_nonce) return window.wc_store_api_nonce;\r\n    return \"\";\r\n  };\r\n\r\n  const addItemViaStoreApi = async (productId, quantity) => {\r\n    const body = new URLSearchParams({\r\n      id: String(productId),\r\n      quantity: String(quantity || 1),\r\n    });\r\n    const nonce = getStoreApiNonce();\r\n    const headers = {\r\n      \"Content-Type\": \"application\/x-www-form-urlencoded; charset=UTF-8\",\r\n    };\r\n    if (nonce) {\r\n      headers.Nonce = nonce;\r\n      headers[\"X-WC-Store-API-Nonce\"] = nonce;\r\n    }\r\n    const res = await fetch(`${API_ROOT}\/cart\/add-item`, {\r\n      method: \"POST\",\r\n      credentials: \"same-origin\",\r\n      headers,\r\n      body: body.toString(),\r\n    });\r\n    if (!res.ok) throw new Error(\"store-api add-item failed\");\r\n    return res.json();\r\n  };\r\n\r\n  const fetchCartState = async () => {\r\n    const nonce = getStoreApiNonce();\r\n    const headers = {};\r\n    if (nonce) {\r\n      headers.Nonce = nonce;\r\n      headers[\"X-WC-Store-API-Nonce\"] = nonce;\r\n    }\r\n    const res = await fetch(`${API_ROOT}\/cart`, {\r\n      credentials: \"same-origin\",\r\n      headers,\r\n    });\r\n    if (!res.ok) throw new Error(\"cart fetch failed\");\r\n    return res.json();\r\n  };\r\n\r\n  const cartHasProduct = (cart, productId) => {\r\n    const want = Number(productId);\r\n    if (!Number.isFinite(want)) return false;\r\n    const items = cart?.items;\r\n    if (!Array.isArray(items)) return false;\r\n    return items.some((item) => {\r\n      const candidates = [item?.id, item?.product_id, item?.parent_id, item?.variation_id];\r\n      return candidates.some((v) => Number(v) === want);\r\n    });\r\n  };\r\n\r\n  const addItemViaWcAjax = async (productId, quantity) => {\r\n    const body = new URLSearchParams({\r\n      product_id: String(productId),\r\n      quantity: String(quantity || 1),\r\n    });\r\n    const wcParams = window.wc_add_to_cart_params;\r\n    if (wcParams?.nonce) {\r\n      body.append(\"security\", wcParams.nonce);\r\n    }\r\n    let ajaxUrl = wcParams?.wc_ajax_url || \"\/?wc-ajax=add_to_cart\";\r\n    if (ajaxUrl.includes(\"%%endpoint%%\")) {\r\n      ajaxUrl = ajaxUrl.replace(\"%%endpoint%%\", \"add_to_cart\");\r\n    } else if (!ajaxUrl.includes(\"wc-ajax=\")) {\r\n      ajaxUrl += ajaxUrl.includes(\"?\") ? \"&wc-ajax=add_to_cart\" : \"?wc-ajax=add_to_cart\";\r\n    }\r\n    const res = await fetch(ajaxUrl, {\r\n      method: \"POST\",\r\n      credentials: \"same-origin\",\r\n      headers: {\r\n        \"Content-Type\": \"application\/x-www-form-urlencoded; charset=UTF-8\",\r\n      },\r\n      body: body.toString(),\r\n    });\r\n    if (!res.ok) throw new Error(\"wc-ajax add_to_cart failed\");\r\n    const data = await res.json().catch(() => ({}));\r\n    if (data && data.error) throw new Error(\"wc-ajax returned error\");\r\n    return data;\r\n  };\r\n\r\n  const addItemToWooCart = async (productId, quantity) => {\r\n    try {\r\n      const cart = await addItemViaStoreApi(productId, quantity);\r\n      if (cartHasProduct(cart, productId)) return cart;\r\n    } catch {\r\n      \/* continue to classic AJAX *\/\r\n    }\r\n    await addItemViaWcAjax(productId, quantity);\r\n    const cart = await fetchCartState();\r\n    if (!cartHasProduct(cart, productId)) {\r\n      throw new Error(\"product not in cart after add\");\r\n    }\r\n    return cart;\r\n  };\r\n\r\n  const resolveProductIdForCard = async (cardEl) => {\r\n    if (!cardEl) return null;\r\n    const cachedId = cardEl.dataset.productId;\r\n    if (cachedId) return cachedId;\r\n    const titleEl = cardEl.querySelector(\"h3 a, .loop-card__title a, h3\");\r\n    const title = titleEl ? titleEl.textContent.trim() : \"\";\r\n    if (!title) return null;\r\n    if (Object.prototype.hasOwnProperty.call(productIdLookupCache, title)) {\r\n      const known = productIdLookupCache[title];\r\n      if (known) cardEl.dataset.productId = String(known);\r\n      return known || null;\r\n    }\r\n    try {\r\n      const rows = await fetchJson(`${API_ROOT}\/products?search=${encodeURIComponent(title)}&per_page=10`);\r\n      const list = Array.isArray(rows) ? rows : [];\r\n      const exact = list.find((p) => (p?.name || \"\").trim().toLowerCase() === title.toLowerCase());\r\n      const fuzzy = list.find((p) => (p?.name || \"\").toLowerCase().includes(title.toLowerCase()));\r\n      const hit = exact || fuzzy || null;\r\n      const id = hit?.id || null;\r\n      productIdLookupCache[title] = id;\r\n      if (id) cardEl.dataset.productId = String(id);\r\n      return id;\r\n    } catch {\r\n      productIdLookupCache[title] = null;\r\n      return null;\r\n    }\r\n  };\r\n\r\n  const newInCard = (product) => {\r\n    const productId = product.id || \"\";\r\n    const image = product.images?.[0]?.src || \"\";\r\n    const title = product.name || \"Product\";\r\n    const url = product.permalink || \"#\";\r\n    const currency = product.prices?.currency_code || \"USD\";\r\n    const regular = money(product.prices?.regular_price, currency);\r\n    const current = money(product.prices?.price, currency);\r\n    const regularHtml = regular && regular !== current ? `<del>${regular}<\/del> ` : \"\";\r\n    return `\r\n      <article class=\"newin-card\" role=\"listitem\" data-product-id=\"${productId}\">\r\n        <a class=\"newin-card__media\" href=\"${url}\">\r\n          <img decoding=\"async\" src=\"${image}\" alt=\"${title}\">\r\n        <\/a>\r\n        <div class=\"newin-card__body\">\r\n          <h3><a href=\"${url}\">${title}<\/a><\/h3>\r\n          <p class=\"newin-card__price\">${regularHtml}<ins>${current}<\/ins><\/p>\r\n          <button type=\"button\" class=\"newin-card__btn js-add-to-cart\" data-product-id=\"${productId}\">Add to cart<\/button>\r\n        <\/div>\r\n      <\/article>\r\n    `;\r\n  };\r\n\r\n  const loopCard = (product) => {\r\n    const productId = product.id || \"\";\r\n    const image = product.images?.[0]?.src || \"\";\r\n    const title = product.name || \"Product\";\r\n    const url = product.permalink || \"#\";\r\n    const price = money(product.prices?.price, product.prices?.currency_code || \"USD\");\r\n    return `\r\n      <article class=\"loop-card\" role=\"listitem\" data-product-id=\"${productId}\">\r\n        <a class=\"loop-card__media\" href=\"${url}\">\r\n          <img loading=\"lazy\" decoding=\"async\" src=\"${image}\" alt=\"${title}\" loading=\"lazy\" width=\"400\" height=\"300\">\r\n        <\/a>\r\n        <div class=\"loop-card__body\">\r\n          <h3 class=\"loop-card__title\"><a href=\"${url}\">${title}<\/a><\/h3>\r\n          <p class=\"loop-card__price\">${price}<\/p>\r\n          <button type=\"button\" class=\"loop-card__btn js-add-to-cart\" data-product-id=\"${productId}\">Add to cart<\/button>\r\n        <\/div>\r\n      <\/article>\r\n    `;\r\n  };\r\n\r\n  const bindAddToCartHandlers = () => {\r\n    document.querySelectorAll(\".js-add-to-cart, .newin-card__btn, .loop-card__btn\").forEach((btn) => {\r\n      if (btn.dataset.cartBound === \"1\") return;\r\n      btn.dataset.cartBound = \"1\";\r\n      btn.addEventListener(\"click\", async (event) => {\r\n        event.preventDefault();\r\n        const card = btn.closest(\".newin-card, .loop-card\");\r\n        const old = btn.textContent;\r\n        btn.textContent = \"Adding...\";\r\n        if (\"disabled\" in btn) btn.disabled = true;\r\n        btn.setAttribute(\"aria-busy\", \"true\");\r\n        try {\r\n          const productId = btn.dataset.productId || (await resolveProductIdForCard(card));\r\n          if (!productId) throw new Error(\"missing product id\");\r\n          await addItemToWooCart(productId, 1);\r\n          btn.textContent = \"Added\";\r\n        } catch {\r\n          btn.textContent = \"Failed\";\r\n        }\r\n        setTimeout(() => {\r\n          btn.textContent = old;\r\n          if (\"disabled\" in btn) btn.disabled = false;\r\n          btn.removeAttribute(\"aria-busy\");\r\n        }, 1800);\r\n      });\r\n    });\r\n  };\r\n\r\n  const cleanupStaticFakeLinks = () => {\r\n    document.querySelectorAll(\".newin-card, .loop-card\").forEach((card) => {\r\n      const media = card.querySelector(\".newin-card__media, .loop-card__media\");\r\n      const titleLink = card.querySelector(\"h3 a, .loop-card__title a\");\r\n      const btnLink = card.querySelector(\".newin-card__btn, .loop-card__btn\");\r\n\r\n      \/\/ Keep visual structure but block static local links until real product URLs are loaded.\r\n      [media, titleLink].forEach((a) => {\r\n        if (!a || !a.getAttribute) return;\r\n        const href = a.getAttribute(\"href\") || \"\";\r\n        if (isLocalHtmlHref(href)) {\r\n          a.setAttribute(\"href\", \"#\");\r\n          a.setAttribute(\"data-fake-link\", \"1\");\r\n        }\r\n      });\r\n\r\n      if (btnLink && btnLink.tagName.toLowerCase() === \"a\") {\r\n        btnLink.classList.add(\"js-add-to-cart\");\r\n        const href = btnLink.getAttribute(\"href\") || \"\";\r\n        if (isLocalHtmlHref(href)) btnLink.setAttribute(\"href\", \"#\");\r\n      }\r\n    });\r\n\r\n    \/\/ Remove remaining demo-only navigation links in these templates.\r\n    document.querySelectorAll('a[href$=\".html\"]').forEach((a) => {\r\n      const href = a.getAttribute(\"href\") || \"\";\r\n      if (\/^(?:\\.\\.\\\/)?main\\\/index\\.html$\/i.test(href) || \/^index\\.html$\/i.test(href)) {\r\n        a.removeAttribute(\"href\");\r\n      }\r\n    });\r\n\r\n    \/\/ Prevent default navigation for fake product links.\r\n    document.querySelectorAll('[data-fake-link=\"1\"]').forEach((a) => {\r\n      if (a.dataset.fakeBound === \"1\") return;\r\n      a.dataset.fakeBound = \"1\";\r\n      a.addEventListener(\"click\", (e) => e.preventDefault());\r\n    });\r\n  };\r\n\r\n  const setPaginationState = () => {\r\n    const prev = document.querySelector(\"[data-sync-prev]\");\r\n    const next = document.querySelector(\"[data-sync-next]\");\r\n    if (!prev && !next) return;\r\n    if (prev) prev.disabled = activePage <= 1;\r\n    if (next) next.disabled = lastPageCount < PRODUCT_LIMIT;\r\n  };\r\n\r\n  const renderProducts = (products, append = false) => {\r\n    const newInGrid = document.querySelector(\".newin-grid\");\r\n    if (newInGrid) {\r\n      if (append) {\r\n        newInGrid.insertAdjacentHTML(\"beforeend\", products.map(newInCard).join(\"\"));\r\n      } else {\r\n        newInGrid.innerHTML = products.map(newInCard).join(\"\");\r\n      }\r\n      setCount(newInGrid.querySelectorAll(\".newin-card\").length);\r\n      bindAddToCartHandlers();\r\n      return true;\r\n    }\r\n    const loopGrid = document.querySelector(\".loop-grid\");\r\n    if (loopGrid) {\r\n      loopGrid.innerHTML = products.map(loopCard).join(\"\");\r\n      bindAddToCartHandlers();\r\n      return true;\r\n    }\r\n    return false;\r\n  };\r\n\r\n  const fetchJson = async (url) => {\r\n    const response = await fetch(url, { credentials: \"same-origin\" });\r\n    if (!response.ok) throw new Error(`Request failed: ${response.status}`);\r\n    return response.json();\r\n  };\r\n\r\n  const resolveCategoryId = async (rawName) => {\r\n    const desiredName = rawName.trim();\r\n    const desiredSlug = buildFallbackSlug(desiredName);\r\n    const categories = await fetchJson(`${API_ROOT}\/products\/categories?per_page=100`);\r\n    const bySlug = categories.find((c) => norm(c.slug) === desiredSlug);\r\n    if (bySlug) return bySlug.id;\r\n    const byName = categories.find((c) => norm(c.name) === desiredSlug);\r\n    if (byName) return byName.id;\r\n    return null;\r\n  };\r\n\r\n  const fetchProductsForPage = async (page = 1, append = false) => {\r\n    if (!activeCategoryId) return;\r\n    const products = await fetchJson(\r\n      `${API_ROOT}\/products?category=${activeCategoryId}&per_page=${PRODUCT_LIMIT}&page=${page}&orderby=${encodeURIComponent(activeOrderBy)}&order=${encodeURIComponent(activeOrder)}`\r\n    );\r\n    if (!Array.isArray(products)) return;\r\n    lastPageCount = products.length;\r\n    renderProducts(products, append);\r\n    setPaginationState();\r\n  };\r\n\r\n  const bindPaginationHandlers = () => {\r\n    const prev = document.querySelector(\"[data-sync-prev]\");\r\n    const next = document.querySelector(\"[data-sync-next]\");\r\n    if (prev && prev.dataset.syncBound !== \"1\") {\r\n      prev.dataset.syncBound = \"1\";\r\n      prev.addEventListener(\"click\", async () => {\r\n        if (activePage <= 1) return;\r\n        activePage -= 1;\r\n        await fetchProductsForPage(activePage, false);\r\n      });\r\n    }\r\n    if (next && next.dataset.syncBound !== \"1\") {\r\n      next.dataset.syncBound = \"1\";\r\n      next.addEventListener(\"click\", async () => {\r\n        if (lastPageCount < PRODUCT_LIMIT) return;\r\n        activePage += 1;\r\n        await fetchProductsForPage(activePage, true);\r\n      });\r\n    }\r\n    setPaginationState();\r\n  };\r\n\r\n  const bindSortHandler = () => {\r\n    const sortSelect = document.querySelector('.newin-toolbar__meta select[aria-label=\"Sort products\"]');\r\n    if (!sortSelect || sortSelect.dataset.sortBound === \"1\") return;\r\n    sortSelect.dataset.sortBound = \"1\";\r\n    applySortPreset(sortSelect.value || \"newest\");\r\n    sortSelect.addEventListener(\"change\", async () => {\r\n      if (!activeCategoryId) return;\r\n      applySortPreset(sortSelect.value || \"newest\");\r\n      activePage = 1;\r\n      try {\r\n        await fetchProductsForPage(1, false);\r\n        if (lastPageCount === 0) {\r\n          const categoryName = categoryNameFromPage();\r\n          renderStatus(`No products found in \"${categoryName}\" for this sort.`);\r\n        }\r\n      } catch (err) {\r\n        console.warn(\"Sort fetch failed:\", err);\r\n        renderStatus(\"Could not load products for this sort. Check WooCommerce Store API.\");\r\n      }\r\n      setPaginationState();\r\n    });\r\n  };\r\n\r\n  const syncCategoryProducts = async () => {\r\n    const categoryName = categoryNameFromPage();\r\n    if (!categoryName) return;\r\n    renderStatus(\"Loading products from backend...\");\r\n    cleanupStaticFakeLinks();\r\n    bindAddToCartHandlers();\r\n    try {\r\n      activeCategoryId = await resolveCategoryId(categoryName);\r\n      if (!activeCategoryId) {\r\n        renderStatus(`No backend category matched \"${categoryName}\".`);\r\n        return;\r\n      }\r\n      activePage = 1;\r\n      await fetchProductsForPage(activePage, false);\r\n      if (lastPageCount === 0) {\r\n        renderStatus(`No products found in \"${categoryName}\" yet.`);\r\n      }\r\n      bindPaginationHandlers();\r\n      bindSortHandler();\r\n    } catch (error) {\r\n      renderStatus(\"Backend request failed. Please check WooCommerce Store API.\");\r\n      console.warn(\"Category sync skipped:\", error);\r\n    }\r\n  };\r\n\r\n  if (document.readyState === \"loading\") {\r\n    document.addEventListener(\"DOMContentLoaded\", syncCategoryProducts);\r\n  } else {\r\n    syncCategoryProducts();\r\n  }\r\n})();\r\n<\/script>\r\n<\/body>\r\n<\/html>\r\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Category Pet Care SparkNest Category Pet Care Filters Category Beauty Car Crafts Electronics Fitness Gifting Kitchen Laundry New in Party Pet Care Seasonal Snacks Stationery Storage Toys Travel All categories Price Under $15 Deal Zone Featured products Products Archive Filters + Loop Item<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-356","page","type-page","status-publish","hentry"],"acf":[],"_hostinger_reach_plugin_has_subscription_block":false,"_hostinger_reach_plugin_is_elementor":false,"_links":{"self":[{"href":"https:\/\/happybuying.shop\/pl\/wp-json\/wp\/v2\/pages\/356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/happybuying.shop\/pl\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/happybuying.shop\/pl\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/happybuying.shop\/pl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/happybuying.shop\/pl\/wp-json\/wp\/v2\/comments?post=356"}],"version-history":[{"count":16,"href":"https:\/\/happybuying.shop\/pl\/wp-json\/wp\/v2\/pages\/356\/revisions"}],"predecessor-version":[{"id":1051,"href":"https:\/\/happybuying.shop\/pl\/wp-json\/wp\/v2\/pages\/356\/revisions\/1051"}],"wp:attachment":[{"href":"https:\/\/happybuying.shop\/pl\/wp-json\/wp\/v2\/media?parent=356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}