larsbuur
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce Google Ads Dynamic Remarketing] Code not working?One more addition. See line 424 here -> https://gist.github.com/LarsBuur/016a336ad25ba3a51b2d648c86ef483c
This link contains the full file using SKU′s and not wordpress post id.
Forum: Plugins
In reply to: [WooCommerce Google Ads Dynamic Remarketing] Code not working?For future viewers I fixed this by changing line 305 in wgdr.php
from
ecomm_prodid: ' . json_encode( $this->mc_prefix . get_the_ID() ) . ',
to
ecomm_prodid: ' . json_encode( $this->mc_prefix . $product->get_sku() ) . ',
and line 414 from
array_push( $cartprods_items, $this->mc_prefix . $entry['product_id'] );
to
array_push( $cartprods_items, $this->mc_prefix . wc_get_product( $entry['product_id'])->get_sku());
Forum: Plugins
In reply to: [WooCommerce Google Ads Dynamic Remarketing] Code not working?Hi Aleks,
You marked this case as resolved a little while ago. Could you explain how to use the SKU field from the products in woocommerce – and not the post id?
best regards,
LarsForum: Plugins
In reply to: [WooCommerce] How to add 'Missing microdata for condition' to Products.That′s very interesting and valuable feedback @davidtrebacz. I certainly makes sense to point to a https resource to not have mixed content.
Comparing https://schema.org/NewCondition and https://schema.org/NewCondition they do not seem to show the same content which seems very strange to me.
Any idea why?
Forum: Plugins
In reply to: [WooCommerce] How to add 'Missing microdata for condition' to Products.Glad it helped. I am sure that there are a more elegant solution – but I could not find any.
Lars
Forum: Plugins
In reply to: [WooCommerce] How to add 'Missing microdata for condition' to Products.None of the above things did work for me – and I think it′s related to woocommerce 3.0 using JSON-LD – and not XML / inline markup for the schema attributes.
I solved it on my site by editing:
/wp-content/plugins/woocommerce/includes/class-wc-structured-data.phpand adding
‘itemCondition’ => ‘https://schema.org/NewCondition’,
in line 207
This is the quick n′ dirty solution. It will probably be overwritten in a future update of woocommerce. Next step will be to just override that specific function.