• Resolved kerryman

    (@kerryman)


    I’m using wpgmp_markers hook to customize the marker icons used on the map as follows:

    add_filter('wpgmp_markers','wpgmp_markers',100,3 );
    
    function wpgmp_markers($places, $map) {
    	foreach ($places as &$place) {
    		$place['location']['icon'] = 'my-custom-icon.svg';
    	}
    	return $places;
    }

    This works as expected during first load however when a filter is applied, the icons revert to their category icon. How can I get my change to stick?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @kerryman

    Thank you for getting in touch.

    Our plugin does not fire the hook wpgmp_markers, it sounds like you may have come through to the wrong place.

    If you’re looking to add markers with categorised icons, you might check our our plugin and some of the available add-ons.

    Is there anything else we can help you with?

    Kind regards
    – Perry

    Thread Starter kerryman

    (@kerryman)

    Yep, sorry, my mistake. Thanks for the quick correction Perry, I’ll check your add-ons also.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘hook wpgmp_markers overridden by filter’ is closed to new replies.