Skip to content

Instantly share code, notes, and snippets.

@gillesgoetsch
gillesgoetsch / ohmail-cla.md
Created July 31, 2026 21:50
ohmail Contributor License Agreement — TrafficFlow GmbH

ohmail Contributor License Agreement

TrafficFlow GmbH, Zürich, Switzerland ("we", "us") maintains ohmail.

Thank you for contributing. This agreement sets out the terms on which your contribution is accepted. It is short on purpose. You keep the copyright in what you write — you are giving us permission to use it, not handing it over.

By signing, you agree to the following for all past and future contributions you submit to this project.

<?php
/**
* Plugin Name: Filter Orders by currency
* Description: Adds the ability to filter orders by currency.
* Author: Gilles Goetsch
* Author URI: https://gillesgoetsch.ch/
* Version: 1.0.0
* Text Domain: wc-filter-orders
* Reference: http://www.skyverge.com/product/woocommerce-filter-orders/
@gillesgoetsch
gillesgoetsch / wc-api-add-oder-currency-filter.txt
Last active April 20, 2020 12:35
WC API v3 - add functionality to filter by order_currency
/**
* WC API v3 - add functionality to filter by order_currency
* example request: /wp-json/wc/v3/orders?status=processing&per_page=-1&currency=EUR
*/
add_filter( 'woocommerce_rest_orders_prepare_object_query', 'theme_woocommerce_rest_orders_prepare_object_query', 10, 2 );
function theme_woocommerce_rest_orders_prepare_object_query( $args, $request ){
$args['meta_query'][] = array(
'key' => '_order_currency',