Skip to main content

offer_from

Function offer_from 

Source
pub fn offer_from(
    item: &str,
    price_ref: &Value,
    data: &Value,
    world_id: &str,
) -> Offer
Expand description

Build an Offer from a commerce.buy action + the focused placement’s data block. price_ref resolution order: the action’s value (string, or an object’s priceRef/productKey/key) → data.priceRef → the item id.