woocommerce_get_order_id_by_order_key

The WooCommerce woocommerce get order id by key function.

Description

woocommerce_get_order_id_by_order_key( $order_key ); 

Parameters (1)

0. $order_key
The order key.

Usage

  1. if ( !function_exists( 'woocommerce_get_order_id_by_order_key' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The order key. 
  5. $order_key = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = woocommerce_get_order_id_by_order_key($order_key); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-deprecated-functions.php  
  1. function woocommerce_get_order_id_by_order_key( $order_key ) { 
  2. return wc_get_order_id_by_order_key( $order_key );