Fix single product parsing after Fourthwall HTML change
All checks were successful
Create Release / build (push) Successful in 5s

Fourthwall changed product title tags from h1 to h2 on individual
product pages, breaking the fourthwall_random and fourthwall_single
shortcodes. Updated XPath query to match new h2 tag structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 12:25:23 -08:00
parent 9b4e28ece1
commit f22615c6d5

View File

@@ -159,7 +159,7 @@ function fwembed_parse_single_product($html_content, $url, $show_description = f
$xpath = new DOMXPath($dom); $xpath = new DOMXPath($dom);
// Extract product information // Extract product information
$productTitle = $xpath->query('//h1[@class="product-info__title"]'); $productTitle = $xpath->query('//h2[@class="product-info__title"]');
$productPrice = $xpath->query('//span[@class="product-info__price product-info__price--original"]'); $productPrice = $xpath->query('//span[@class="product-info__price product-info__price--original"]');
$productImage = $xpath->query('//div[@data-gallery="gallery-slide"][1]//img[@class="gallery__image-object"]'); $productImage = $xpath->query('//div[@data-gallery="gallery-slide"][1]//img[@class="gallery__image-object"]');
$productDesc = $xpath->query('//div[@class="product-info__description"]//div[@class="html-formatter"]'); $productDesc = $xpath->query('//div[@class="product-info__description"]//div[@class="html-formatter"]');