pronamic / wp-pronamic-pay-memberpress

MemberPress driver for the WordPress payment processing library.
http://www.wp-pay.org/extensions/memberpress/
4 stars 1 forks source link

Usage of `define()` constants as globals? #4

Closed remcotolsma closed 2 years ago

remcotolsma commented 2 years ago

Something I noticed quickly in https://github.com/pronamic/wp-pronamic-pay-memberpress/commit/d3f586bac90da4adb096512cd471c75b4eb4d9c9.

@rvdsteege How constant are PRONAMIC_PAY_MEMBERPRESS_REFUNDED_TRANSACTION_ID and PRONAMIC_PAY_MEMBERPRESS_CHARGED_BACK_TRANSACTION_ID? I think we should avoid such constructions. Move the $memberpress_gateway->record_refund(); implementation to maybe_record_memberpress_transaction_refund( Payment $payment )?

https://github.com/pronamic/wp-pronamic-pay-memberpress/commit/d3f586bac90da4adb096512cd471c75b4eb4d9c9#commitcomment-74885292