diff --git a/RAJAONGKIR_INTEGRATION.md b/RAJAONGKIR_INTEGRATION.md index 887c059..2dba5d3 100644 --- a/RAJAONGKIR_INTEGRATION.md +++ b/RAJAONGKIR_INTEGRATION.md @@ -50,7 +50,7 @@ add_action('rest_api_init', function() { function woonoow_rajaongkir_search_destinations($request) { $search = sanitize_text_field($request->get_param('search') ?? ''); - if (strlen($search) < 2) { + if (strlen($search) < 3) { return []; } @@ -112,9 +112,10 @@ add_filter('woocommerce_checkout_fields', function($fields) { 'class' => ['form-row-wide'], 'placeholder' => __('Search destination...', 'woonoow'), // WooNooW-specific: API endpoint configuration - 'search_endpoint' => '/woonoow/v1/rajaongkir/destinations', + // NOTE: Path is relative to /wp-json/woonoow/v1 + 'search_endpoint' => '/rajaongkir/destinations', 'search_param' => 'search', - 'min_chars' => 2, + 'min_chars' => 3, // Custom attribute to indicate this is for Indonesia only 'custom_attributes' => [ 'data-show-for-country' => 'ID',