This is for filtering the schema data for downloadable products. This will allow developers to further expand extension ideas.
See #3295 for a detailed description.
Interesting. Ill need to look at this one in more depth. Might be better to have a get_schema method rather than a hooked in template?
Ok great. The code I submitted was written quickly to show an example of the possibilities. If there is a better way to put this in place, i'm all ears.
Shorter code for Schema template file.
Just a quick note: This needs a default value (even for downloadable products) that will use the default schema output. This will be used for downloads that don't fit in a specific download type (or when not set).
Improved the code a little.
Turned the schema into a function rather than a hook, suggested by Mike
Removed schema template
I have tested the code and it works on my end. Please verify. This would be great if it was added for the next release. Thanks.
It'd be great to be able to filter available downloads for people based on date of their sign-up, i.e. digital magazine subscriptions.
Can you explain a little more about how that would be part of the schema @douglance Thanks.
Sale Event added to Schema if product is on sale.
simpler woocommerce_get_product_schema function.
So is this now merged @mikejolley ?
Sort of, it wouldn't mege automatically due to recent changes so I put my take on it. Rather than having a template file, I've just added a function to the actual itemscope param
@mikejolley It looks good. Will I still be credited for this feature ?
@seb86 I didn't merge it, so it won't show you on github.
@mikejolley oh :( Will I still be named in the readme.txt file then ?
@seb86 Nobody is mentioned in the readme.txt file, you can just have your name in the contributors list (also shown in welcome screen of the plugin) if your patch is merged in.