Support

Account

Home Forums ACF PRO ACF Google Maps callback error Reply To: ACF Google Maps callback error

  • para mi ninguna de estas formas funcionan correctamente. Yo cargo todos los scripts desde functions.php

      wp_register_script('google_js',
                'https://maps.googleapis.com/maps/api/js?key=API_KEY', true, '3');
                wp_enqueue_script('google_js');
                
                wp_register_script('custom-maps', THEME_DIR . '/js/google-maps.js', array('jquery'), true, '1');
                wp_enqueue_script('custom-maps');

    and I have implemented the callback function as well.

    function my_acf_google_map_api( $api ){
        $api['key'] = 'API_KEY';
        $api['callback'] = 'Function.prototype';
        return $api;
    }
    add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');

    But I still have the same error