get_title(); $id = $method->id; $options[ $id ] = $title; } } $wc_shipping = \WC()->shipping(); foreach ( $wc_shipping->get_shipping_methods() as $method_id => $method_obj ) { if ( ! array_key_exists( $method_id, $options ) ) { $options[ $method_id ] = $method_obj->get_method_title(); } } return $options; } } add_action( 'update_option_aisp_otools_pending_timeout_days', function( $old, $new ) { if ( ! wc_string_to_bool( get_option( 'woocommerce_manage_stock' ) ) ) { return; } $minutes = absint( $new ) * DAY_IN_SECONDS / 60; update_option( 'woocommerce_hold_stock_minutes', $minutes ); }, 10, 2 );