New features in Sliced Invoices v3.10.0 update
Sliced Invoices v3.10.0 brings some quality of life enhancements to make your invoicing needs even easier and better than before.
Replaced “Clone” feature with “Copy to New [Invoice/Quote]” feature
If you often create invoices by cloning from an existing one and then making adjustments, then you already know how our “Clone” feature works. Originally it made a quite literal clone, down to the last detail. As it turns out this is not what most users want, and over the years we’ve adjusted the feature to make certain allowances. For example, not duplicating the invoice number, not duplicating payments data, etc. This improved the user experience, but created cognitive dissonance for our dev team — “is it a clone or not?” (Developers being the literal-minded thinkers that we are…)
So we decided to ditch the “Clone” feature and replace it with what users actually want — the ability to copy an existing quote or invoice to a new one merely as a “template”, so they can quickly modify a few details and be on their way. That’s what our new “Copy to New [Invoice/Quote]” feature is designed to do.
What does this mean in a technical sense? We copy just the important fields: title, description, line items, terms, client, and a few others. Compared to before, we no longer keep “created”, “due”, and/or “valid until” dates — we assign new ones. We start a fresh log. We do not copy taxonomies, so the new quote/invoice will always be set to “Draft” to start. We do still copy post metas, but only those ones prefixed with ‘_sliced’ and excluding non-cloneable metas.
What does the mean for the typical user? It means you no longer have to remember to update any of the created, due, or valid until dates, and you don’t have to worry about any other extraneous information being copied over. It’s just the basics that you want.
(If for some reason you want to keep the old-style “Clone” functionality, you can do so by adding this code snippet.)
Automatically regenerate quote/invoice slug when changing title
Another thing you may have experienced if you clone copy a lot of invoices, is that eventually you end up with a lot of slugs (part of the URL) that look wonky. For example, imagine you have a client that you bill monthly and each invoice is titled “[Name of Month] Invoice”. Let’s say the first one looks like this:
Title: August 2025 Invoice
URL: https://example.com/sliced_invoice/august-2025-invoice/
That’s fine, right? Then you clone it for the next month. Of course you can always update the slug, but if you forget to do so it ends up looking like this by default:
Title: September 2025 Invoice
URL: https://example.com/sliced_invoice/august-2025-invoice-2/
Now continue that pattern out a few more months:
Title: October 2025 Invoice
URL: https://example.com/sliced_invoice/august-2025-invoice-2-2/Title: November 2025 Invoice
URL: https://example.com/sliced_invoice/august-2025-invoice-2-2-2/Title: December 2025 Invoice
URL: https://example.com/sliced_invoice/august-2025-invoice-2-2-2-2/
Confusing, right?
It makes sense if you understand the way WordPress copies and stores content. Each “post” (or in this case, invoice) must have a unique “slug” — the part of the URL at the end. When there’s duplication, WordPress adds a number to the end, like “-2”. You can change the title after this, but it doesn’t automatically update the slug. Again, that’s just how WordPress works.
That’s why we’ve added this feature to automatically regenerate the slug of your quote/invoice whenever you change the title, so you get nice looking URLs without having to remember to change them yourself.
However, please note: this feature will not trigger once the quote or invoice has been emailed out. If you change the slug after sending the email, then the link in that email would no longer be valid and the user will get a 404 page if they click it. That’s why the URL really shouldn’t change once you’ve sent the email out (although you still could change it manually if you have to).
Change “Create new Invoice from Quote” feature to follow same logic as “Copy to New [Invoice/Quote]” feature
If you have a quote that, let’s say, has been accepted by your client, and is now ready to become an invoice, you might use the “Create new Invoice from Quote” button to do this. This was essentially the same as “cloning” the quote and changing it to an invoice. However now that we’ve replaced the “clone” feature, we’ve also updated this feature to follow the same rules/logic as the new “Copy to New [Invoice/Quote]” feature described above.
Exclude quotes and invoices from default WordPress sitemap
Newer versions of WordPress automatically generate a sitemap to help search engines discover all the content of your site, whether you want this or not. Most users probably don’t want their quotes/invoices searchable on Google, so this change will help keep that from happening.
If you use some other SEO plugin (like Yoast SEO) we still recommend you exclude quotes and invoices from your sitemaps using your SEO plugin’s settings.
Also if you haven’t already, we recommend you read the Securing Your Invoices section of our documentation.
For Developers: added method “set_as_draft” to class “Sliced_Quote”; some new hooks
The Sliced_Invoice class already had a method set_as_draft you could use to quickly set the invoice to draft status, but the Sliced_Quote class lacked this. We have now corrected this oversight. Instead of having to do $quote->set_status( $id, 'draft' ), you can now do simply $quote->set_as_draft().
We’ve also added the following new hooks: sliced_invoices_converted_quote_to_invoice, sliced_invoices_created_invoice_from_quote, and sliced_invoices_duplicated_quote_invoice.
Version 3.10.0 contains several other small fixes and enhancements, so please be sure to read the changelog to find out more. If you have any questions or need help, let our support team know.
Cheers,
-The Team at Sliced Invoices
No comments