• RedAISkye

    (@redeyedrocker)


    Is it possible to remove download links from order invoice for digital products? I only saw the option to remove product links.

    If it is currently not possible, please add this feature soon!

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

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support villasupport

    (@villasupport)

    Hi,

    To meet your requirements, you can override the current template by removing the following filter line in the code: https://ibb.co/M896NZN

    Best regards

    Thread Starter RedAISkye

    (@redeyedrocker)

    @villasupport

    Thanks, that works perfectly!

    But, do I need to modify the plugin every time it updates?

    Plugin Support villasupport

    (@villasupport)

    Hi,

    Yes, of course, you must revert the overrided template whenever you update the plugin.

    Best regards.

    Thread Starter RedAISkye

    (@redeyedrocker)

    @villasupport

    I had Automatic Updates disabled for this plugin but it somehow still updated to latest.

    I went and applied the same workaround but it’s no longer working. The download link is still included in the order email.

    Can “disable download link” be made an option like the option that lets you disable product link from order emails?

    Plugin Support lavendervu2510

    (@lavendervu2510)

    Hi,

    1. Auto update plugins is a WordPress feature and we do not interfere with this function.
    2. We recommend you overwrite templates via a theme, so your modification will not be lost by the plugin’s updates. You can see our guide.
    3. The feature you asked for: disable download link seems not to be suitable for common usages, so it will not be considered added to our plugin at this time.

    Best regards.

    Thread Starter RedAISkye

    (@redeyedrocker)

    @lavendervu2510

    1. I know, I was just saying that it updated automatically even though I had disabled it for the plugin.
    2. The modification is done on the plugin files, so I’m not sure how I would override the plugin’s template.
    3. I’m not asking to disable download completely, just an option to not include the download link on the order email like with product link.
    4. Customers will still be able to access the download link from my-account page, it’s just that they won’t get it directly in their email but will have to visit the site to access their downloads.
    Plugin Support lavendervu2510

    (@lavendervu2510)

    Hi,

    2. Please kindly follow our guide to overwrite templates via a theme, so your modification will not be lost by the plugin’s updates. You can see?our guide.

    3. We regret to inform you that we cannot offer support for this request. The download link you mentioned appears to be a WooCommerce core feature, and currently, there is no option to hide this link in our plugin.

    Best regards.

    Thread Starter RedAISkye

    (@redeyedrocker)

    1. Okay, I will follow that guide and see if it works.
    2. I know there’s no such option currently which is the reason I’m making the suggestion to make it into an optional feature.
    Plugin Support lavendervu2510

    (@lavendervu2510)

    Hi,

    2. This option has not been planned to update our plugin yet, sorry for saying that.

    Best regards.

    Thread Starter RedAISkye

    (@redeyedrocker)

    @lavendervu2510

    I have tested the template override method but it’s not working.

    Plugin Support lavendervu2510

    (@lavendervu2510)

    Hi,

    We appreciate your effort.

    Please try to alter this new method by adding the below PHP snippets, you can see this guide to insert code snippets.

    add_action( 'woocommerce_email', 'remove_order_downloads_from_emails', 10, 999 );
    function remove_order_downloads_from_emails( $emails ){
        remove_action( 'woocommerce_email_order_details', array( $emails, 'order_downloads' ), 10, 9999);
    }

    Best regards.

    Thread Starter RedAISkye

    (@redeyedrocker)

    @lavendervu2510

    Tried that PHP snippet and it still doesn’t work.

    Plugin Support lavendervu2510

    (@lavendervu2510)

    Hi, the priority should be changed, please try one of the below codes:

    add_action( 'woocommerce_email', 'remove_order_downloads_from_emails', 9999, 1);
    function remove_order_downloads_from_emails( $emails ){
        remove_action( 'woocommerce_email_order_details', array( $emails, 'order_downloads' ), 10, 1);
    }

    Or try the below codes:

    add_action( 'woocommerce_email_order_details', 'remove_downloads_section_from_refunded_order_emails', 9999, 4 );
    function remove_downloads_section_from_refunded_order_emails( $order, $sent_to_admin, $plain_text, $email ){
        if( $email->id === 'customer_refunded_order' )
            remove_action( 'woocommerce_email_order_details', array( WC()->mailer(), 'order_downloads' ), 10 );
    }

    If these solutions do not resolve the issue, unfortunately, we are unable to offer any further suggestions at this time.

    Best regards.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Request] Option to Remove download links from order invoice.’ is closed to new replies.