Hi @spis, did you figure this out?
I am trying to do the same.
Thread Starter
spis
(@spis)
Hello @robey,
Yes I get it By using the dynamic-text-extension plugin.
https://wordpress.org/plugins/contact-form-7-dynamic-text-extension/
also add the below code in your functions.php page.
/* Sku shortcode */
function cf7_add_sku(){
global $product;
return $product->get_sku();
}
add_shortcode(‘CF7_ADD_SKU’, ‘cf7_add_SKU’);
Great, thank you!
and what was the shortcode you used in the form?
I actually got it to work without that function, and just using this shortcode within the form
[dynamictext dynamictext-sku “CF7_get_post_var key=’_sku'”]
Hi spis/Robey, do either of you have a link to a page that displays how this works on the front-end? I’ve been requested a certain feature, and think this plugin may work for me, but I would like to see the output first.
Thanks.
I’m using in this form on the right hand side, see how the product name and sku are pre-filled in the form.
These values are also included in the email notifications sent to the client.
http://www.bremco.com.au/forklift-towball-attachment/
I am trying to achieve the same, but I want to output the variation sku. With your codes, it grabs always the parent product sku, not the variation sku. Any idea how to fix that? Many thanks in advance!