Created
March 10, 2020 18:29
-
-
Save hedqvist/2121b48c0848ed5a6cc7017fec1a424b to your computer and use it in GitHub Desktop.
Swish - Change paymentreference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @snippet WooCommerce - Change Reference | |
| * @author Redlight Media AB / Christopher Hedqvist | |
| * @compatible WooCommerce 3.9.0 | |
| */ | |
| function redlight_swish_custom_reference( $data, $order ) { | |
| $ref = $data['payeePaymentReference']; | |
| $data['payeePaymentReference'] = 'swish-'.$ref; | |
| return $data; | |
| } | |
| add_filter('redlight_swish_ecommerce_paymentrequest_data', 'redlight_swish_custom_reference', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment