Support

Home Forums Event Espresso Premium Payment Method for Administrators

Payment Method for Administrators

Posted: February 15, 2016 at 4:09 am

Viewing 1 reply thread


Everett Buel

February 15, 2016 at 4:09 am

Hello All,
Is there a way to have the Invoice method for payment setup so that only a EE4 Administrator can see it on the Front of the Website? I don’t want just a visitor to the site to be able to see one of the payment methods, but an administrator logged in can.

Cheers for now,
Everett


Tony

  • Support Staff

February 15, 2016 at 9:13 am

Hi Everett,

Yes this is possible, take a look here:

https://gist.github.com/Pebblo/f952f806aec55df5f8a1

That snippet actually enabled a ‘Check’ payment method for Admins but you can do the same with Invoice.

Change out:

$check_payment_method = EEM_Payment_Method::instance()->get_one_of_type( 'Check' );

For:

$invoice_payment_method = EEM_Payment_Method::instance()->get_one_of_type( 'Invoice' );

Then swap out any instances of $check_payment_method for $invoice_payment_method

That snipped is packaged up as a Site Specific Plugin so you can install it like a plugin or add the code to your own plugin.

Viewing 1 reply thread

The support post ‘Payment Method for Administrators’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso