M
Forum Replies Created
-
AuthorPosts
-
August 12, 2019 at 2:13 pm in reply to: Stripe – Discount (Error: The subscription plan in Stripe could not be created) #3388
Great stuff, thanks Patrik.
Seems like it’s working. We will let the customers know that tried before … to try again.
Thanks
MarcAugust 12, 2019 at 8:54 am in reply to: Stripe – Discount (Error: The subscription plan in Stripe could not be created) #3386This reply has been marked as private.July 15, 2019 at 10:05 am in reply to: Ninja Form Create Invoice Add On – invoice created without GB VAT #3244Hi Patrik
No worries, I don’t think I explained properly. I’ve basically scrapped the idea of using the Create Invoice Add On. This is a different problem relating to the function wpinv_insert_invoice()
I’ll sort it myself, just was hoping you’d know what could cause the loop that I’ve got to save myself debugging it.
Ta
July 14, 2019 at 3:28 pm in reply to: Ninja Form Create Invoice Add On – invoice created without GB VAT #3242Hi Patrik
Thanks for the information.
I’ve tried to create a shortcode to do what I’m after using your function wpinv_insert_invoice().
Bizarrely it seems to get stuck in a loop and create 1000s of invoices before the webbrowser comes back with an error.Here’s my code, I’ve literally just grabbed it from your examples and modified it to be a shortcode. Probably done something basic wrong.
function create_blogging_invoice( $atts ) { $atts = shortcode_atts( array( 'item_id' => null, 'user_id' => null ), $atts ); $item_id = $atts['item_id']; $user_id = $atts['user_id']; $data = array( 'status' => 'wpi-pending', 'user_id' => $user_id, 'cart_details' => array( array( 'id' => $item_id ), ) ); $invoice = wpinv_insert_invoice( $data, false ); return $invoice; } add_shortcode( 'create_blogging_invoice', 'create_blogging_invoice' );Then I’m calling the above shortcode on a certain page load.
Any idea why the above would create 1000s of invoices?
July 9, 2019 at 7:17 pm in reply to: Ninja Form Create Invoice Add On – invoice created without GB VAT #3234This reply has been marked as private. -
AuthorPosts