Code Snippets

The code snippets below should be placed in your child theme’s functions.php file. Doing so will allow for you to upgrade Sprout Invoices without losing your customizations. If you’re not sure how WordPress actions and filters work, checkout this wiki, they’re super powerful and help Sprout Invoices fully customizable.

 

Adding New and Customizing Existing Line Items

Adding a Print page button on estimates and invoices

Redirect to Invoice After Estimate Approval

Convert Percentage Column to Discount (on the front-end)

Set Default Invoice Due Date

Customizing Default Invoice Information – Example: Invoice ID with Custom Date and Number

Customize Invoice ID based on Sequence and Prefix

Creating an Invoice via the API

Creating an Estimate via the API

Create a Project form an Estimate Acceptance

Translating text strings

Getting a user’s estimates and invoices

Creating an invoice programmatically

Redirect if not logged in

Creating a Client (and user)

Creating a payment

Sending an Invoice

Manually Setting Locale

Filter Default Estimation Fields

Customizing Sprout Invoice Templates (via CSS)

Set line items on Estimate Submission

Add CSS to the PDF Generated Invoice

Remove Admin Bar links

Limit Sprout Invoices Post Type Access

Custom CSS for Print Invoices/Estimates

Automatically Send Invoice after it’s Auto Generated

Modifying Icons for PayPal EC purchase option

Adding Additional Columns to the Invoice admin

Adding VAT to Invoices and Estimates

Automatically Approve Submitted Estimate (with Advanced Form Integration Add-on)

Remove Line Item Comments

Change the To: Email for Admin Notifications

Change Post Type Registration – Change “Client” to “Account”