• Hi WC Support,

    The completed order emails are being sent out, they’re just not including the download link to the product. I’ve been stuck on this for over 2 weeks.

    I’ve changed the WP Prefix and then de/re-activated WC, the woocommerce_downloadable_product_permissions table has been created and is logging the orders.

    I’ve changed themes, disabled all my plug-ins (minus WC), contacted my hosting company to see if their email server is not allowing the links to go through (they said this is not the case), but still the download link is not showing up in the final customer email. I’ve also contacted my theme developer’s support team but they are not sure either.

    I’m stumped. I hope I’m just doing something stupid. Please let me know what else I can provide apart from what I have below.

    Here are screenshots for product settings, order info page, completed email page, and screenshot showing the SQL table is logging them in the backend.

    https://tacticaltalks.com/blog/wp-content/uploads/2017/01/product_settings.png
    https://tacticaltalks.com/blog/wp-content/uploads/2017/01/order.png
    https://tacticaltalks.com/blog/wp-content/uploads/2017/01/completed-order-email.png
    https://tacticaltalks.com/blog/wp-content/uploads/2017/01/wc_downloadable_product_permissions-table.png

    Here is status report as well:

    
    ### WordPress Environment ###
    
    Home URL: https://tacticaltalks.com
    Site URL: https://tacticaltalks.com/blog
    WC Version: 2.7.0
    Log Directory Writable: ?
    WP Version: 4.7.1
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.0.12
    PHP Post Max Size: 128 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 4000
    cURL Version: 7.45.0
    OpenSSL/1.0.1e
    
    SUHOSIN Installed: –
    MySQL Version: 5.6.33
    Max Upload Size: 128 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 2.7.0
    WC Database Prefix: wp_k20z3r_
    woocommerce_sessions: ?
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    woocommerce_shipping_zones: ?
    woocommerce_shipping_zone_locations: ?
    woocommerce_shipping_zone_methods: ?
    woocommerce_payment_tokens: ?
    woocommerce_payment_tokenmeta: ?
    MaxMind GeoIP Database: ? The MaxMind GeoIP Database does not exist - Geolocation will not function. You can download and install it manually from https://dev.maxmind.com/geoip/legacy/geolite/ to the path: . Scroll down to "Downloads" and download the "Binary / gzip" file next to "GeoLite Country". Please remember to uncompress GeoIP.dat.gz and upload the GeoIP.dat file only.
    
    ### Security ###
    
    Secure connection (HTTPS): ?Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
    Hide errors from visitors: ?
    
    ### Active Plugins (17) ###
    
    Compact Audio Player: by Tips and Tricks HQ – 1.9.6
    Contact Form 7: by Takayuki Miyoshi – 4.6
    Cornerstone: by Themeco – 1.3.3
    FV Gravatar Cache: by Foliovision – 0.3.6
    Google Analyticator: by SumoMe – 6.5.0.0
    Jetpack by WordPress.com: by Automattic – 4.5
    Quick Page/Post Redirect Plugin: by anadnet – 5.1.8
    SF Move Login: by Grégory Viguier – 2.4.1
    Thrive Headline Optimizer: by Thrive Themes – 1.1.6
    Thrive Leads: by Thrive Themes – 1.95.6
    Thrive Ovation: by Thrive Themes – 1.0.5
    Thrive Ultimatum: by Thrive Themes – 1.5.6
    Thrive Visual Editor: by Thrive Themes – 1.500.6
    W3 Total Cache: by Frederick Townes – 0.9.5.2
    WooCommerce: by WooThemes – 2.7.0-beta-1
    WordPress Related Posts: by Sovrn
    zemanta – 3.6.3
    
    Yoast SEO: by Team Yoast – 4.1
    
    ### Settings ###
    
    API Enabled: ?
    Force SSL: –
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    ### WC Pages ###
    
    Shop base: #6882 - /shop/
    Cart: #6718 - /cart/
    Checkout: #6719 - /checkout/
    My account: #6720 - /my-account/
    
    ### Theme ###
    
    Name: X – Child Theme
    Version: 1.0.0
    Author URL: https://theme.co/
    Child Theme: ?
    Parent Theme Name: X
    Parent Theme Version: 4.6.4
    Parent Theme Author URL: https://theme.co/
    WooCommerce Support: ?
    
    ### Templates ###
    
    Archive Template: Your theme has a woocommerce.php file
    you will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues.
    
    Overrides: x/woocommerce/cart/cart-empty.php
    x/woocommerce/cart/cross-sells.php version 1.6.4 is out of date. The core version is 2.7.0
    x/woocommerce/loop/loop-end.php
    x/woocommerce/loop/loop-start.php
    x/woocommerce/loop/pagination.php
    x/woocommerce/notices/error.php
    x/woocommerce/notices/notice.php
    x/woocommerce/notices/success.php
    x/woocommerce/single-product/product-image.php version 2.6.3 is out of date. The core version is 2.7.0
    x/woocommerce/single-product/product-thumbnails.php version 2.6.3 is out of date. The core version is 2.7.0
    x/woocommerce/single-product/related.php version 1.6.4 is out of date. The core version is 2.7.0
    x/woocommerce/single-product/tabs/tabs.php
    x/woocommerce/single-product/up-sells.php
    x/woocommerce/single-product-reviews.php
    
    Outdated Templates: ?Learn how to update
    
Viewing 15 replies - 1 through 15 (of 32 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Try using a different file format – as far as I know, WP doesn’t like .zip file all that much.

    I’m basing this off of the following code: https://github.com/woocommerce/woocommerce/blob/162aa986b69a05c8acd3e581adc36abf9a615da9/includes/class-wc-product-download.php#L41

    Also, double-check your settings under **WooCommerce > Settings > Products > Downloadable Products > Access Restriction** by enabling *Grant access to downloadable products after payment*

    Thread Starter ttmatt

    (@ttmatt)

    Thanks for the reply Riaan.

    I changed the download file URL as you mentioned. I tried .MP3 file that I uploaded to WP Media, .PDF file that’s in my WP Media, and also just a Google Docs URL for a file I uploaded (this doesn’t have a file extension of a specific file type). Oh, and I tried using a PNG image URL. The download link still did not show up in the completed order email.

    The Grant Access option was already checked, I even tried unchecking it as well.

    I cleared cache between each troubleshooting step.

    Another issue I found that is strange, is when I leave the number of available downloads empty (supposed to make it Unlimited) in the product settings page, it will tell me that there are no more download attempts remaining when I attempt to download the file from the order page (in WooCommerce–Orders–Order# in WP admin). That’s after I put the order through and marked it as Completed.

    So, knowing that, I changed the number of available downloads to an amount just to be sure that wasn’t the cause of my main issue. That didn’t help unfortunately.
    https://tacticaltalks.com/blog/wp-content/uploads/2017/01/png-test.png

    I didn’t see anything in your WC report, but would it be possible that you have a custom email template that is missing the downloadable ?

    Thread Starter ttmatt

    (@ttmatt)

    Hey James! All the email templates are default. I was planning on customizing them, I just wanted to make sure functionality worked first. Thanks for the idea!

    Did you update the table prefix in the wp-config.php file?

    From wp_k20z3r_ to your new table prefix?

    Thread Starter ttmatt

    (@ttmatt)

    Well…James ^ made it happen!!! Thank you very much.

    He gave me some troubleshooting steps to follow and then ultimately took the controls himself to find the problem in the code.

    Took 5 hours of his time (a good chunk of it was because I was slow implementing his steps) but he made it happen! He knows code like a boss.

    Basically, this is what was going on:

    – The get_item_downloads() function was pulling ID’s, but when it pulled the files to check the downloads it went off DOWNLOAD_IDS, huge difference, so it was saying no downloads were available for the order

    – When passing the downloadable files back to the templates, email and where ever else – it WAS sending it as an Object with missing data. So had to convert the WC_Product_Download object into temp object and create a new array to send back filled with the WC_Product_Download->get_file() and similar functions

    Not sure if anyone else had this issue, but be careful if downloading the latest beta.

    WooCommerce, pay this man!

    I’m having a similar problem. @ttmatt can you give me some clues on what to check to see if it’s the same problem?

    I got the same problem, but I don’t know what this means:

    Basically, this is what was going on:

    – The get_item_downloads() function was pulling ID’s, but when it pulled the files to check the downloads it went off DOWNLOAD_IDS, huge difference, so it was saying no downloads were available for the order

    – When passing the downloadable files back to the templates, email and where ever else – it WAS sending it as an Object with missing data. So had to convert the WC_Product_Download object into temp object and create a new array to send back filled with the WC_Product_Download->get_file() and similar functions

    Not sure if anyone else had this issue, but be careful if downloading the latest beta.

    wtf? ??
    What can I do to make this work?

    Only if I set the product price to 0,00€ I get the download link in the purchase email. If it’s set to 0,01€ or higher it doesn’t show up…

    Here’s my status report:

    
    ### WordPress Environment ###
    
    Home URL: https://www.18wildweeks.com
    Site URL: https://www.18wildweeks.com
    WC Version: 2.6.14
    Log Directory Writable: ?
    WP Version: 4.7.2
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: de_DE
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 5.6.27-0+deb8u1.1
    PHP Post Max Size: 256 MB
    PHP Time Limit: 180
    PHP Max Input Vars: 1000
    cURL Version: 7.38.0
    OpenSSL/1.0.1t
    
    SUHOSIN Installed: ?
    MySQL Version: 5.7.15
    Max Upload Size: 256 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 2.6.14
    : 
    woocommerce_sessions: ?
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    woocommerce_shipping_zones: ?
    woocommerce_shipping_zone_locations: ?
    woocommerce_shipping_zone_methods: ?
    woocommerce_payment_tokens: ?
    woocommerce_payment_tokenmeta: ?
    MaxMind GeoIP Database: ?
    
    ### Active Plugins (7) ###
    
    Change Table Prefix: von Manish Kumar Agarwal – 1.4
    Google Analytics for WordPress: von praveenchauhan1984 – 1.1
    Social Pug: von DevPups
    Mihai Iova – 1.3.1
    
    Ultimate Social Media PLUS: von UltimatelySocial – 2.5.6
    WooCommerce PayPal Express Checkout Gateway: von Automattic – 1.1.2
    WooCommerce Memberships: von WooThemes / SkyVerge – 1.7.5
    WooCommerce: von WooThemes – 2.6.14
    
    ### Settings ###
    
    Force SSL: –
    Currency: EUR (€)
    Currency Position: left
    Thousand Separator: .
    Decimal Separator: ,
    Number of Decimals: 2
    
    ### API ###
    
    API Enabled: ?
    
    ### WC Pages ###
    
    Shop-Basis: #8 - /shop/
    Warenkorb: #9 - /warenkorb/
    Kasse: #10 - /kasse/
    Mein Konto: #11 - /mein-konto/
    
    ### Taxonomies ###
    
    Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    ### Theme ###
    
    Name: Story
    Version: 1.8.3
    Author URL: https://pexetothemes.com/
    Child Theme: ? – Wenn du WooCommerce mit einem Theme
    das du nicht selbst entwickelt hast
    an eigene Bedürfnisse anpasst
    dann empfehlen wir die Verwendung eines Child Themes. Siehe Wie du ein Child Theme erstellst (engl.)
    
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: Dein Theme hat eine woocommerce.php-Datei
    was dazu führt
    dass du das Template woocommerce/archive-product.php nicht überschreibenk annst
    da woocommerce.php h?her gewichtet wird als archive-product.php. Das ist beabsichtigt
    um Darstellungsprobleme zu verhindern.
    
    Overrides: –
    

    One last edit:
    When I return to the website after I purchased the product, I don’t see the download link.
    See here: https://imgur.com/BfqtDR0
    Then I tried to refresh the page and suddenly there is the download link…
    See here: https://imgur.com/qBcOziJ

    How can I set it up that this refresh isn’t necessary?

    • This reply was modified 7 years, 9 months ago by DannyoASB.
    • This reply was modified 7 years, 9 months ago by DannyoASB.
    • This reply was modified 7 years, 9 months ago by bdbrown.
    • This reply was modified 7 years, 9 months ago by DannyoASB.
    Thread Starter ttmatt

    (@ttmatt)

    First thing I’d recommend is going through this thread: https://www.ads-software.com/support/topic/no-download-link-in-the-final-mail-to-costumer/

    I’ve seen the thread – and in the end I searched for the topic that you opened ??

    Thread Starter ttmatt

    (@ttmatt)

    Haha, gotcha. Hmm, what if you change the price to something above 0 and then create a coupon code that gives a 100% discount, and then use that. Does that include the download in the email if you do it that way?

    I never tried it by setting the price to $0 (at least I don’t remember if I did).

    And one other question, you are using an earlier version of WC than I was using, did you by chance install the latest beta before that? That’s what I did since it came with my theme. That’s the only thing I can think of that caused my issue to begin with. Me re-naming the stacks was not necessary because the stack was not originally missing, I did it anyways just to be sure.

    Pretty much I did all the things available on the web, it took a code master (James – @volcommky) to see what was going on internally.

    One more thing, since WC support doesn’t really come on these forums, you can check these spots:

    Advanced WooCommerce Facebook Group: https://www.facebook.com/groups/advanced.woocommerce
    WooCommerce Slack Community: https://woocommerceslack.herokuapp.com

    They are more active on those channels and seemed eager to help.

    There are a few things to check for Danny

    So first off, it includes the download link when the price is set to 0 because it does not require payment and download is authorized.

    Anything more would need to wait for payment confirmation / payment status being complete.

    It looks like you are using PayPal, do you have your IPN setup? This is where when you make a purchase through PayPal, your website will have accepted a payment, then PayPal will send your website more info updating the order. At that point the download link would be available.

    So in theory, if you see the download link on the website – you should be able to resend the payment complete email from the order details page and the email you receive should contain the download link.

    Thanks for your posting!

    Checked my IPN settings, they seemed to be OK.

    I tried something new and I come closer and closer to the problem:
    – I waited 10 seconds on the PayPal confirmation page before returning to the merchant’s page
    – Now I see the download link on the confirmation page on my website
    – In the email the link is still missing…

    So i seems to be an issue about SECONDS… the mail seems to be sent a couple of seconds before the system approves confirmation. (But the order status is “paid” immediately after the payment)

    How could I fix this?

    What is your end order status?
    Downloads become available once order status is set to “Completed”

    Have you tried going into the admin area
    WooCommerce > Orders > A COMPLETED ORDER > Order Actions (Drop list top right) > Resend Order Emails > Completed Order

    Then click the little arrow to shoot the email off?

    End order status is always “completed” immediately after the payment. But it seems that there is something like a delay for a couple of seconds. If I refresh the confirmation page I get the download link.
    Resending emails seems not to work. I have no idea why… are there any email settings I can make?

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘Emails Not Including Download Links’ is closed to new replies.