autoship_customer_metrics_fields_mapping (filter)

(src/customers.php) Used to filter the names of the User Metadata fields in which the metrics data is stored. 

Code

$fields = apply_filters( 'autoship_customer_metrics_fields_mapping', array(
    'customerCreatedDateUTC'            => 'autoship_customer_created_date_utc',
    'firstScheduledOrderCreatedUTC'     => 'autoship_first_scheduled_order_created_utc',
    'totalScheduledOrdersActive'        => 'autoship_total_scheduled_orders_active',
    'totalScheduledOrdersActiveValue'   => 'autoship_total_scheduled_orders_active_value',
    'totalScheduledOrdersPaused'        => 'autoship_total_scheduled_orders_paused',
    'totalScheduledOrdersPausedValue'   => 'autoship_total_scheduled_orders_paused_value',
    'totalScheduledOrdersFailed'        => 'autoship_total_scheduled_orders_failed',
    'totalScheduledOrdersFailedValue'   => 'autoship_total_scheduled_orders_failed_value',
    'totalScheduledOrdersDeleted'       => 'autoship_total_scheduled_orders_deleted',
    'totalScheduledOrdersDeletedValue'  => 'autoship_total_scheduled_orders_deleted_value',
    'totalScheduledOrdersLifetimeValue' => 'autoship_total_scheduled_orders_lifetime_value',
    'averageProcessingCycleValue'       => 'autoship_average_processing_cycle_value',
    'lastSuccessfulProcessingCycleDate' => 'autoship_last_successful_processing_cycle_date',
    'lastFailedProcessingCycleDate'     => 'autoship_last_failed_processing_cycle_date',
    'lastPausedScheduledOrderDate'      => 'autoship_last_paused_scheduled_order_date',
    'totalSuccessfulProcessingCycles'   => 'autoship_total_successful_processing_cycles',
    'totalProductsPurchased'            => 'autoship_total_products_purchased',
    'firstProductsPurchased'            => 'autoship_first_products_purchased',
    'allProductsPurchased'              => 'autoship_all_products_purchased'
  ) );

Found in the Functions

  • autoship_get_customer_metrics_fields ()