WooShippingMethodApi extension
WooCommerce Shipping Method API Extension
This extension provides comprehensive shipping method management capabilities for WooCommerce stores. Shipping methods define how products are delivered to customers, including delivery options, costs, and availability rules for e-commerce applications.
Shipping Method Overview
Shipping methods are delivery options configured in WooCommerce that determine how products are shipped to customers. They provide a way to offer different delivery options with varying costs and timeframes to enhance the customer shopping experience.
Key Features
- Method Retrieval: Fetch all available shipping methods from the store
- Individual Access: Get specific shipping method details by ID
- Display Information: Access human-readable titles and descriptions
- Fake Data Support: Built-in fake data generation for testing and development
Shipping Method Types
- Flat Rate: Fixed cost shipping regardless of weight or distance
- Free Shipping: No cost shipping (usually with minimum order requirements)
- Local Pickup: Customer picks up items from physical location
- Custom Methods: Third-party shipping integrations and custom solutions
Example Usage
// Get all shipping methods
final methods = await wooCommerce.getShippingMethods();
// Get specific shipping method
final method = await wooCommerce.getShippingMethod(id: 'flat_rate');
// Display shipping options to customers
for (final method in methods) {
print('${method.title}: ${method.description}');
}
- on
Methods
-
getShippingMethod(
{required String id, bool? useFaker}) → Future< WooShippingMethod> -
Available on WooCommerce, provided by the WooShippingMethodApi extension
Retrieves a specific shipping method by its unique identifier. -
getShippingMethods(
{bool? useFaker}) → Future< List< WooShippingMethod> > -
Available on WooCommerce, provided by the WooShippingMethodApi extension
Retrieves a paginated list of shipping methods from the WooCommerce store.