wordpressemailwoocommerce

Ability to identify customers / orders placed via the REST API


Is there a function (or at least a plugin) that identifies a customer created through the REST API, and prevents them from sending emails as "account creation confirmation" or "order confirmation"?

Thanks per advance, Paul.


Solution

  • Since the 3.9.1 update of Woocommerce, we have a function to do that : https://web.archive.org/web/20180117154247/http://woocommerce.wp-a2z.org/oik_api/wc_orderget_created_via/

    $string = WC_Order::get_created_via( $context );