Fix single product parsing after Fourthwall HTML change
All checks were successful
Create Release / build (push) Successful in 5s
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:
@@ -159,7 +159,7 @@ function fwembed_parse_single_product($html_content, $url, $show_description = f
|
||||
$xpath = new DOMXPath($dom);
|
||||
|
||||
// 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"]');
|
||||
$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"]');
|
||||
|
||||
Reference in New Issue
Block a user