Hello!
Thanks for your inquiry. You should be able to add Sprout Invoices shortcode directly to your WordPress pages or posts. Are you trying to display this shortcode as a part of your client dashboard?
Thank you,
Looking forward to hearing back from you!
Hello @khaled70,
Thank you for reaching out to support! We do have our dynamic text that can be used in the line items if the add-on is enabled. Below is a list of those. However, I wanted to confirm if you meant to send this data in the notification of an invoice creation in Ninja forms?
Invoice ID: [si type="id"],
Current due date is [si type="due"],
Due date Plus one month: [si type="month" offset="+1"].
Current month minus three: [si type="month" offset="-3"].
Invoice due year plus one: [si type="year" offset="+1"].
Invoice Quarter plus three: [si type="quarter" offset="+3"].
Current discount applied is: [si type="discount"].
Invoice ID: [si type="invoice_id"].
Thanks
Elana D.
Thank you for the reply..
I’m using Ninja forms and the Ninja Forms + Sprout Invoices – Easy Invoice & Estimate Submissions plugin.
use
Create Post +
Create Estimate or Invoice
I have no problem with shortcodes in Create Estimate or Invoice
But these short codes are not enabled in the post published from the front end of the user.
I hope I have explained the problem and I apologize for my poor English.
note:
I’m temporarily using the free Sprout Invoices plugin.
If I purchase the plugin will the short codes be shown?
Thank you
Hello @khaled70,
Thank you for reaching out to support! Those code will work inside of an invoice with the Pro version but it wouldn’t work on a post without getting the data first. However, you would probably still need to get the data anyway. You would have to get the instance like below on a Ninja form submission and update your WordPress post with the data you wanted.
function maybe_modify_ninja_forms( SI_Invoice $invoice, $invoice_args = array(), $submission = array(), $entry = array()) {
// Only a specific form do this process
$form_id_to_process = 1; // change
if ( $entry['form_id'] != $form_id_to_process ) {
return;
}
$invoice = SI_Invoice::get_instance( $invoice_id );
}
add_action( 'si_invoice_submitted_from_adv_form', 'maybe_modify_ninja_forms', 10, 10 );
Thanks
Elana D.
Hello @khaled70,
Per our support guidelines, I’m going to mark this as resolved. Please don’t hesitate to reach out if you are still having any issues.
Thanks
Elana D.