autoship_qpilot_orders_update_via_rest_apply_coupons (filter)

(src/coupons.php) within the autoship_qpilot_orders_update_via_rest_apply_coupons() function. This filter can be used to disable / enable the virtual coupons functionality by order (WooCommerce Order). Takes the processing id and current order as parameters.


// @param WC_Abstract_Order $order The current order.

// We Use the Processing ID to ensure even though the order came through rest-api it's
  // a QPilot generated order.
  $id = autoship_get_scheduled_order_processing_id( $order );
  if ( apply_filters( 'autoship_qpilot_orders_update_via_rest_apply_coupons', empty( $id ), $id, $order ) )