Embed Snippet on Your Site
Restrict Coupons by Shipping Methods
To find your exact shipping method IDs, you can use either of these quick methods:
1. The URL Method: Go to WooCommerce → Settings → Shipping, click into each shipping zone, and hover over the shipping method link. The instance ID will be visible in your browser's URL preview at the bottom (e.g., instance_id=1 translates to flat_rate:1).
2. The Debug Method: Alternatively, you can temporarily add var_dump( WC()->session->get('chosen_shipping_methods') ); to your template files on a staging environment to see exactly which active IDs are currently in use during checkout.
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Comments