Alan
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Hi, were you able to implement Apple Pay and Google Pay in your plugin?
This code solved my problem
function ai_seo_change_canonical($canonical) { global $product; if(is_product() && !empty($_GET)) { $variationID = (new \WC_Product_Data_Store_CPT())->find_matching_product_variation( new \WC_Product($product->get_id()), $_GET ); if($variationID) { $variation = wc_get_product($variationID); if($variation) { $canonical = $variation->get_permalink(); } } } return $canonical; } add_filter('wpseo_canonical','ai_seo_change_canonical');- This reply was modified 2 years, 9 months ago by Alan.
I don’t have the option to make a separate page for each product variant. I synchronize inventory with a third-party service. That’s why I use the WooCommerce Single Variations plugin. I can write unique meta tags and description for each product variation. They will be unique.
Viewing 3 replies - 1 through 3 (of 3 total)