countries ? WC()->countries->get_states( 'GH' ) : array(); return array( 'publishableKey' => (string) $settings->get( 'publishable_key' ), 'baseURL' => $settings->browser_api_base_url(), 'showMap' => (bool) $settings->get( 'show_map' ), 'tileUrl' => (string) $settings->get( 'tile_url' ), 'required' => (bool) $settings->get( 'required' ), 'ghStates' => is_array( $states ) ? $states : array(), 'initial' => $initial, 'labels' => self::labels(), ); } /** * Translatable strings for the widget. * * @return array */ public static function labels() { return array( 'label' => __( 'Delivery location', 'afrihex-address-for-woocommerce' ), 'required' => __( 'required', 'afrihex-address-for-woocommerce' ), 'placeholder' => __( 'GhanaPostGPS code, place, or directions', 'afrihex-address-for-woocommerce' ), 'help' => __( 'E.g. GA-183-8164, "Accra Mall", or "opposite Goil, Madina Zongo Junction".', 'afrihex-address-for-woocommerce' ), 'locate' => __( 'Use my current location', 'afrihex-address-for-woocommerce' ), 'locating' => __( 'Finding you…', 'afrihex-address-for-woocommerce' ), 'currentLocation' => __( 'Current location', 'afrihex-address-for-woocommerce' ), 'noResults' => __( 'No matches. Try a landmark near you, or a GhanaPostGPS code.', 'afrihex-address-for-woocommerce' ), 'locationDenied' => __( 'Location is off. Allow it in your browser, or type your address.', 'afrihex-address-for-woocommerce' ), 'offline' => __( 'Suggestions are not available right now. Type your address or directions; we will check it after you order.', 'afrihex-address-for-woocommerce' ), 'directions' => __( 'Directions', 'afrihex-address-for-woocommerce' ), 'dragHint' => __( 'Not quite right? Drag the pin, or tap the map, to mark your gate.', 'afrihex-address-for-woocommerce' ), 'pinMoved' => __( 'Pin moved. We will deliver to the new spot.', 'afrihex-address-for-woocommerce' ), 'mapLabel' => __( 'Map of your delivery location', 'afrihex-address-for-woocommerce' ), 'missing' => __( 'Please enter your delivery location.', 'afrihex-address-for-woocommerce' ), ); } }