| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public static function create_simple_flat_rate() { |
||
| 21 | $flat_rate_settings = [ |
||
| 22 | 'enabled' => 'yes', |
||
| 23 | 'title' => 'Flat rate', |
||
| 24 | 'availability' => 'all', |
||
| 25 | 'countries' => '', |
||
| 26 | 'tax_status' => 'taxable', |
||
| 27 | 'cost' => '10', |
||
| 28 | ]; |
||
| 29 | |||
| 30 | update_option( 'woocommerce_flat_rate_settings', $flat_rate_settings ); |
||
| 31 | update_option( 'woocommerce_flat_rate', [] ); |
||
| 32 | WC_Cache_Helper::get_transient_version( 'shipping', true ); |
||
| 33 | WC()->shipping()->load_shipping_methods(); |
||
| 34 | } |
||
| 35 | |||
| 48 |