Wishlist::user_url()

Summary

Get the user’s private URL to view the wishlist


Return

(string)


Source

File: src/BigCommerce/Accounts/Wishlists/Wishlist.php

	public function user_url() {
		$page_id = get_option( Wishlist_Page::NAME, 0 );
		if ( empty( $page_id ) || get_post_status( $page_id ) !== 'publish' ) {
			return home_url();
		}
		$url = add_query_arg( [
			Shortcodes\Wishlist::LIST_PARAM => $this->list_id(),
		], get_permalink( $page_id ) );

		/**
		 * Filter the URL for a user to manage a wishlist
		 *
		 * @param string   $url      The wishlist URL
		 * @param Wishlist $wishlist The wishlist object
		 */
		return apply_filters( 'bigcommerce/wishlist/user-url', $url, $this );
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.