autoship_apply_customer_info_to_all_scheduled_order_default

(src > customers.php) Retrieves the default setting to apply to all Scheduled Orders. Takes a $user_id and $enabled (default: false). Used to default updating the Shipping Address in My Account > Addresses to apply the shipping address to all Scheduled Orders.

Example

/**
* Always apply shipping address changes to all scheduled orders.
* @param bool $enable True if apply to all else false.
* @param int $id The current user's id.
* @return bool The filtered value.
*/
function xx_always_apply_to_scheduled_orders( $enable, $id ){

    // Always apply changes to Shipping address to all scheduled orders.
    return true;
  }
  add_filter( 'autoship_apply_to_scheduled_orders_by_default', 'xx_always_apply_to_scheduled_orders', 10, 2 );

Still need help? Contact Us Contact Us