Support » Plugin: WooCommerce Quote or Enquiry Contact Form 7 » Automatically add product id to product name

  • I resolved this issue.

    1) Edit woocommerce-quote-or-enquiry-contact-form-7.php file. Add following lines after line 279 (at version 1.8 : jQuery('.wqoecf-pop-up-box div.wpcf7>form input[name="product-name"]').attr('readonly', true); ).

    jQuery('div.wqoecf-pop-up-box .wpcf7 span.product-name input').val(wqoecf_form_data.product_title + " #" + product_id );

    jQuery('.wqoecf-pop-up-box div.wpcf7>form input[name="product-pk"]').val(product_id);

    2) Add a hidden input to CF7 in “Form” tab:

    [hidden product-pk default:”0″]

    3) Use it, CF7 in “Mail” tab:

    Product Name: [product-name]

    Edit link: [_site_url]/wp-admin/post.php?post=[product-pk]&action=edit

    Product Name: Woo T-shirt #628
    Edit link:

    The page I need help with: [log in to see the link]

  • The topic ‘Automatically add product id to product name’ is closed to new replies.