Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toevoegen woocommerce order id aan metadata #365

Open
Thijmens opened this issue May 13, 2020 · 0 comments
Open

Toevoegen woocommerce order id aan metadata #365

Thijmens opened this issue May 13, 2020 · 0 comments

Comments

@Thijmens
Copy link

Ik probeer in een eigen plugin de orderid van Woocommerce toe te voegen aan de metadata {jortt_invoice_reference: 'abc'} van Mollie.

function custom_mollie_metadata( $metadata ) {
	
	global $order_id;
	$metadata += array( "jortt_invoice_reference" => $order_id );
	
	return $metadata;
	}
	
add_filter( 'mollie-payments-for-woocommerce_payment_object_metadata', 'custom_mollie_metadata' ); 

Echter lijkt het erop dat de gevraagde functie niet werkt zoals bedoeld. Iemand enig idee waar dit mis gaat?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant