- Product Types
- Prices Types
- Adding Products
- One Time Pricing
- Subscription Pricing
- Subscription Trials Setup
- Installment Pricing
- Donation / Pay What You Want
- Inventory Management
- Product Variants
- Variant Images
- Digital Downloads
- Change Product Availability
- Template Customization
- Product Collections
- First-Time Payment Discounts
- Manage Product Access
- Create Product With Free Trials
- Charge Set Up Fee on Trials
- Product List
- Product Pages
- Create Product Page in Elementor
- Custom Buy Links
- Product SEO
- Change Permalinks
- Custom Fields
- Test Mode
- Make Test Payments
- Edit & Customize Form
- Change Form Template
- Delete SureCart Forms
- Custom Checkout Form
- Add New Checkout Form
- Checkout Form With Gutenberg
- Checkout Form in Elementor
- Custom Thank You Page
- Create Donation Form
- Customize Confirmation Popup
- Include Coupons in URLs
- Pre-Fill Checkout Fields
- Change Checkout Texts
- Password Field in Checkout
- Default Country Code
- Add Terms to Checkout
- Conditional Block Checkouts
- Remove Coupon Field
- Hide Quantity Option
- Disable Quantity Editing
- Disable Item Removal
- Country Specific Purchases
- Update Store Details
- Dark Mode
- Orders & Receipts
- Menu & Slide-out Cart
- Manage Slide-out Cart
- Customers Section Overview
- Create Customer
- Delete Customer
- Update Customer Details
- Edit Invoice Details
- Create Shipping Profiles
- Manage Shipping
- Disable Payment Processor
- Manage Store Notifications
- Manage PayPal Branding
- How to transfer a store to a new organization and assign a license.
- How to Download SureCart Purchase Invoice
- Fix View Order Button
- Fix Express Payment Buttons
- How To Stop Sending WooCommerce Notifications via SureCart?
- Fix PayPal Test Connection
- Fix Sign-In Loop
- Fix Order Confirmation Redirect
- Fix Divi Bullet Point Issue
- Fix Customer Dashboard
- Fix JSON Response Error
- Failed Payment Behavior
- Fix Stripe Zip Code Error
- Fix "Product Can’t Be Blank"
- Troubleshooting Guide
- PayPal IPN Warning Emails
- Caching Configuration for SureCart
- Why iDEAL Might Not Appear in Your CheckoutÂ
- Compatibility Guide
How to Hide/Change the Download Invoice Button on Your Customer Dashboard
For certain unique situations, you might prefer to use your own invoices or receipts, or even exclude SureCart’s default ones from the customer dashboard.
Here’s what the download invoice button looks like on your customer’s dashboard:
Fortunately, SureCart provides a PHP filter to do this. You just need to add this filter to your functions.php file.
You can use a code snippets plugin or integrate it through an alternative method to implement this change.
How to Add this Code to Your WordPress Site
In this article, we use this Code Snippets plugin to integrate the provided code into our functions.php file.
However, feel free to use any code snippet plugin you prefer.
- Copy the following code.
add_action(
'surecart/order/set_attribute',
function( $attribute, $name ) {
if ( 'statement_url' !== $name ) {
return $attribute;
}
return ''; // you can also customize this.
},
10,
2
);
- Navigate to your WordPress dashboard’s Functions (PHP) section under Snippets > All Snippets.
- Click on the Add New button at the top.
- Paste the copied code snippet in this box. You can also give a title and description for this snippet here.
- Once you’re done, click on the Save Changes and Activate button below.
Congrats! The snippet is now activated on your site.
Navigate to your customer dashboard now to see if the Download Receipt/Invoice button is still visible or not.
You can customize the above code to change the invoice URL according to your preferences.
That’s it! Hope this solution helped you. If you face any issues while integrating this code or still see the download button, please reach to our support team. We’re always here to help.
We don't respond to the article feedback, we use it to improve our support content.