Support » Plugin: WP Product Review Lite » Geotargeting option

  • Resolved amanda34

    (@amanda34)


    Hello
    Is it possible to use some geotargeting option for affiliate links from the plugin itself?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support contactashish13

    (@rozroz)

    @amanda34 could you please describe in more detail what you have in mind?

    Hello

    The idea is to be able to redirect the affiliate links to the country of origin of the user. That is, the links included in the plugin (image, call to action button …).

    Regards

    Plugin Support contactashish13

    (@rozroz)

    @amanda34 you can use this code to change the URLs as you wish:

    
    	add_filter( 'wppr_links', 'wppr_links', 10, 2 );
    	function wppr_links( $links, $review_id ) {
    		if ( is_admin() ) {
    			return $links;
    		}
    		$new_links = array();
    		foreach ( $links as $text => $url ) {
    			// change the url in some way
    			$new_links[ $text ] = $url;
    		}
    		return $new_links;
    	}
    
    Plugin Support contactashish13

    (@rozroz)

    Closing this

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.