Autoship Data Added to Items in Cart

(src/cart.php) Autoship Cloud attaches data to items selected for Autoship when they are added to the cart. This data is used at checkout when creating Scheduled Orders. 

  • _autoship_frequency_type - The selected frequency type (eg Days, DayOfTheWeek, Weeks, DayOfTheMonth, Months)

  • _autoship_frequency - The frequency (number) of the selected frequency type 
  • _autoship_next_occurrence (string * optional) - The resulting Scheduled Order's Next Occurrence Date for its first cycle after checkout. If the item has a Relative Next Occurrence Date set on the product in WooCommerce, the date is calculated by adding the product's  ' _autoship_relative_next_occurrence_type' &  ' _autoship_relative_next_occurrence' metadata to return a date relative to the current datetime. 
  • _autoship_preferred_shipping (string * optional) - A value that can be programmatically set to an Autoship Cloud shipping rate name and then used in the created Scheduled Order to auto-select the corresponding shipping rate (if valid / available)