autoship_get_scheduled_order_customer_data

(src > orders.php) Can be used to modify the global order data ( customer info, payment info, status etc ) and takes the 1. schedule order data and 2. (WooCommerce) order as parameters.

Example

function xx_modify_so_product_title ($scheduled_order_item_data, $order){
    if($scheduled_order_item_data['Product']['ExternalId'] == 9051){
        $scheduled_order_item_data['Product']['Title'] .= ' New & Improved!';
    }
    return $scheduled_order_item_data;
}
add_filter('autoship_get_scheduled_order_customer_data', 'xx_modify_so_product_title', 10, 2);

Still need help? Contact Us Contact Us