Title: How to activate this function?
Last modified: August 21, 2016

---

# How to activate this function?

 *  [Aniela](https://wordpress.org/support/users/aniela/)
 * (@aniela)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/how-to-activate-this-function/)
 * Hello,
 * i have a plugin and want to activate this function:
    // href=” echo get_ permalink(
   get_option(‘jigoshop_myaccount_page_id’)); “>Log in to Add to Wish List
 * It doesnt appear on my page yet, but I want it to disply “Log in to Add to Wish
   List”, but I dont know how to. This is the whole code snippet where this part
   is embedded:
 *     ```
       function jwl_addToWishListButton( $post, $_product ){
       	global $user_ID, $jwlOptions;
   
       	if( $user_ID ){
       		$list = new jwl_wishlist( $user_ID , 'user_id', false );
       	?>
       	<form method="POST" action="" class="jwl-wishlist" >
       		<input type="hidden" name="jwl_product_id" value="<?php echo $post->ID; ?>" />
       		<input type="hidden" name="jwl_user_id" value="<?php echo $user_ID; ?>" />
       		<input type="hidden" name="jwl_list_id" value="<?php echo $list->id ; ?> " />		
   
       		<!-- Nonce -->
       		<?php wp_nonce_field( 'add-remove-wishlist-item', 'jwl_addremove_nonce', false); ?>
   
       		<?php if( !$list->item_exists( $post->ID ) ): ?>
       		<input type="submit" name="jwl_addToWishList" class="<?php echo $jwlOptions->op( 'add-to-cart-class' ); ?>" value="<?php _e( $jwlOptions->op( 'add-to-wishlist-button-text' ) , 'jigowishlist' ); ?>" />
       		<?php elseif( $jwlOptions->op( 'show-remove-button' ) ): ?>
       		<input type="submit" name="jwl_removeFromWishList" class="<?php echo $jwlOptions->op( 'add-to-cart-class' ); ?>" value="<?php _e( $jwlOptions->op( 'remove-from-wishlist-button-text' ) , 'jigowishlist' ); ?>" />
       		<?php endif; ?>
       		</form>
       	<?php
       	}
       	//  href=" echo get_ permalink(get_option('jigoshop_myaccount_page_id')); ">Log in to Add to Wish List
   
       }
       ```
   
 * If anybody has an idea what to change or add I’d be so happy. Thank you!
 * _[Moderator Note: Please post code & markup between backticks or use the code
   button. Your posted code may now have been permanently damaged by the forum’s
   parser.]_

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/how-to-activate-this-function/#post-4587706)
 * This line is all messed up. The best I can make of it should be this:
    `?><a 
   href="<?php echo get_ permalink(get_option('jigoshop_myaccount_page_id')); ?>"
   >Log in to Add to Wish List</a>`
 * This may still not be right since I don’t know if the preceding is really correct
   or what comes next. Best to repost your code from `</form>` on to the next couple
   lines beyond, this time between backticks.

Viewing 1 replies (of 1 total)

The topic ‘How to activate this function?’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [html](https://wordpress.org/support/topic-tag/html/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/how-to-activate-this-function/#post-4587706)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
