We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shouldn't we also fix the product variation name, sku, and url on the markup?
I'm in doubt if we should do it at the product or the offer level.
Product level: (...) if ( ! empty( $variation ) ) { $markup['name'] = $variation->get_name(); $markup['sku'] = $variation->get_sku() != '' ? $variation->get_sku() : $markup['sku']; $markup['url'] = $variation->get_permalink(); $price_valid_until = date( 'Y-12-31', current_time( 'timestamp', true ) + YEAR_IN_SECONDS ); (...)
(...) if ( ! empty( $variation ) ) { $markup['name'] = $variation->get_name(); $markup['sku'] = $variation->get_sku() != '' ? $variation->get_sku() : $markup['sku']; $markup['url'] = $variation->get_permalink(); $price_valid_until = date( 'Y-12-31', current_time( 'timestamp', true ) + YEAR_IN_SECONDS ); (...)
Offer level: (...) $markup_offer['priceValidUntil'] = $price_valid_until; $markup_offer['name'] = $variation->get_name(); $markup_offer['sku'] = $variation->get_sku() != '' ? $variation->get_sku() : $markup['sku']; $markup_offer['url'] = $variation->get_permalink(); (...)
(...) $markup_offer['priceValidUntil'] = $price_valid_until; $markup_offer['name'] = $variation->get_name(); $markup_offer['sku'] = $variation->get_sku() != '' ? $variation->get_sku() : $markup['sku']; $markup_offer['url'] = $variation->get_permalink(); (...)
I would risk and say we should do it at the product level if we want Google to see this as an individual product.
The text was updated successfully, but these errors were encountered:
Github messed up my code...
I can submit a PR of you want to.
Sorry, something went wrong.
A PR might be helpful to see exactly what you're proposing.
Successfully merging a pull request may close this issue.
Shouldn't we also fix the product variation name, sku, and url on the markup?
I'm in doubt if we should do it at the product or the offer level.
Product level:
(...) if ( ! empty( $variation ) ) { $markup['name'] = $variation->get_name(); $markup['sku'] = $variation->get_sku() != '' ? $variation->get_sku() : $markup['sku']; $markup['url'] = $variation->get_permalink(); $price_valid_until = date( 'Y-12-31', current_time( 'timestamp', true ) + YEAR_IN_SECONDS ); (...)
Offer level:
(...) $markup_offer['priceValidUntil'] = $price_valid_until; $markup_offer['name'] = $variation->get_name(); $markup_offer['sku'] = $variation->get_sku() != '' ? $variation->get_sku() : $markup['sku']; $markup_offer['url'] = $variation->get_permalink(); (...)
I would risk and say we should do it at the product level if we want Google to see this as an individual product.
The text was updated successfully, but these errors were encountered: