Alex Howes

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts

  • Alex Howes
    Buyer
    Post count: 175

    Hi Paulo,

    This seems odd. Is it possible that by ‘cleaning up’ the pending invoices you might mistakenly delete the invoice of someone in the middle of a transaction?

    Alex


    Alex Howes
    Buyer
    Post count: 175

    Hi Paulo,

    Is there another solution to this issue? It is causing quite a problem on my site and also seems like a general problem. E.g. the plugin might retrieve a draft invoice from months ago when the item price might have been very different!

    Alex


    Alex Howes
    Buyer
    Post count: 175

    Hi Patrik,

    Sorry to be revisiting this issue after some time. I haven’t resolved it yet.

    I think this is probably intended behaviour of the plugin. I have an item setup which a user can purchase. When they click to buy the item, the plugin creates an invoice. If they click away without purchasing the item the plugin saves that invoice to draft. Later on if the same user clicks to buy the item again, the plugin retrieves the drafted invoice rather than creating a new one. This means that any updates made to the item in the intervening time are not there (e.g. item title, price, etc.)

    Is there a way to delete the invoice when a user clicks away, rather than saving it as a draft? That way the next time the user clicks to buy the item the plugin would create a new invoice.

    Hope that’s clear,
    Alex

    in reply to: Function get invoices #2313

    Alex Howes
    Buyer
    Post count: 175

    Aha, I’ve found wpinv_get_users_invoices()

    Should have looked harder the first time, sorry ๐Ÿ™‚

    in reply to: CSS Button colours #1991

    Alex Howes
    Buyer
    Post count: 175

    Great, thanks Patrik! ๐Ÿ™‚

    in reply to: CSS Button colours #1985

    Alex Howes
    Buyer
    Post count: 175

    Hi Kor,

    For some reason the CSS is not coming through.

    Alex

    in reply to: CSS Button colours #1983

    Alex Howes
    Buyer
    Post count: 175
    This reply has been marked as private.
    in reply to: Hook after payment confirmed but before email sent #1952

    Alex Howes
    Buyer
    Post count: 175

    Hi Patrik,

    I tried changing add_action() to add_filter() and also added a filter to hook to in the code but it didn’t work. The details changed within the function but on the wpi-checkout page they are unchanged. Perhaps it is being overwritten later on, or the wpi-checkout page is retrieving the item details from somewhere else?

    Alex

    in reply to: Hook after payment confirmed but before email sent #1933

    Alex Howes
    Buyer
    Post count: 175

    Hi Patrik,

    I’m having difficulty changing the item details for items processed through the wpinv buy shortcode. I’ve tried hooking onto wpinv_setup_invoice but when I set the item details there they don’t change anywhere else. E.g. the item name shown on the checkout page is unchanged. My code is below.

    
    
    add_action('wpinv_setup_invoice','add_fields_to_invoice_setup',10,2);
    
    function add_fields_to_invoice_setup($this_invoice, $invoice_id) {
        $this_invoice->payment_meta['cart_details'][0]['name'] = 'Testing';
    }

    Is there a function called after setup_invoice that’s overwriting it?

    Thanks,
    Alex

    in reply to: Hook after payment confirmed but before email sent #1884

    Alex Howes
    Buyer
    Post count: 175

    Hi Patrik,

    Thanks for your information. I’m happy with doing the customization myself, it’s just helpful to have a pointer as to the appropriate hooks I can use- it’s hard to know without being familiar with the code so I appreciate your help ๐Ÿ™‚

    I see the hook from the wpinv_insert_invoice() function is an action. Is there a filter I can hook to instead? I want to change the details of the invoice items. Do you know what I could use for that?

    It looks like wpinv_email_content is what I need for the email part. It looks like I can put a condition on the email type to prevent my code applying to all emails sent.

    Thanks,
    Alex

    in reply to: CF7 Proceed to checkout #1877

    Alex Howes
    Buyer
    Post count: 175

    Thanks ๐Ÿ™‚

    in reply to: Hook after payment confirmed but before email sent #1876

    Alex Howes
    Buyer
    Post count: 175

    Thanks, that’d be good ๐Ÿ™‚

    Let me explain a bit more clearly. What I need is:

    1) I have a [wpinv-buy] shortcode on some of my posts. Is there an action or filter I can hook to that’s called after the “Buy” button is pressed but before the wpi-checkout page appears? (I’d like to edit the invoice items dynamically to include the post id of the post the shortcode is on).

    2) An action or filter to hook to after payment is confirmed but before the client email is sent (so that I can dynamically edit the client email depending on the invoice item).

    Looking forwards to hearing from you after the weekend ๐Ÿ™‚

    Alex

Viewing 12 posts - 1 through 12 (of 12 total)