pronamic / wp-pronamic-pay

The Pronamic Pay plugin allows you to easily accept payments with payment methods like credit card, iDEAL, Bancontact and Sofort through a variety of payment providers on your WordPress website.
https://pronamicpay.com
34 stars 14 forks source link

Payment description merge tags #358

Closed rvdsteege closed 9 months ago

rvdsteege commented 1 year ago

From customer:

Where can I find a list of available merge tags for WooCommerce, to use in the payment/transaction description?

[…] For the custom payment description I'm now looking for the merge tags for 'single product name' and 'customer name', to make each transaction/payment from WooCommerce more recognizable, both in the Mollie dashboard and in the bank account.

[…] Are there any ready-made merge tags available for this? Or can you help me with a code-snippet to add these in the functions.php of the active theme, to make them available for use in these settings?

We have a few tags available (and mentioned) for use in the WooCommerce payment method description setting: {order_number}, {order_date}, {blogname}.

Specifically for Mollie, there's also a filter pronamic_pay_mollie_payment_description:

Custom tag replacements can also be added by hooking into the pronamic_pay_pre_create_payment action:

I've created a Gist for customer and item names tags, using this action:

However, we could also add some kind of merge tag controller which allows for payment data being used through tags in the payment description in all supported plugin integrations. For example:

Internal Help Scout ticket: https://secure.helpscout.net/conversation/2239610520/25619

remcotolsma commented 1 year ago

In https://github.com/pronamic/wp-pronamic-pay-adyen/issues/22 a customer also needed the support of merge tags {gf_form_id} and {gf_entry_id}. If we introduce the ability to register merge tags we could include it in https://github.com/pronamic/wp-pronamic-pay-gravityforms.

kjtolsma commented 10 months ago

Ziekenhuis Nij Smellinghe heeft ook de wens om een andere merge tag te gebruiken (Product titel). Het gaat in dit geval om Mollie i.c.m. WooCommerce.

remcotolsma commented 9 months ago

Ondersteuning voor merge tag {payment_lines_name} is toegevoegd via https://github.com/pronamic/wp-pay-core/pull/149. Zojuist ook nog even getest en dit werkt goed:

Scherm­afbeelding 2023-09-29 om 14 35 48 Scherm­afbeelding 2023-09-29 om 14 35 25 Scherm­afbeelding 2023-09-29 om 14 36 29 Scherm­afbeelding 2023-09-29 om 14 36 44

De nieuwe merge tag functionaliteit geeft ruimte voor meer merge tags, maar voor nu hebben we daar niet hele concrete wensen in.