Forums Forums Search & Filter Pro Get Woocommerce Shop Url

Viewing 5 posts - 1 through 5 (of 5 total)
  • Trevor
    #233907

    Hi

    What happens if you use this function instead?

    https://docs.woocommerce.com/wc-apidocs/function-wc_get_page_permalink.html

    Alternatively, you would need to trim the url (trim anything from and including the ? to the right). Like this I think:

    $shop_page_url = strtok(get_permalink( wc_get_page_id( 'shop' ) ),'?');

    Anonymous
    #233909

    Hi Trevor,

    Neither of the solutions work. Is there some way to plug in the reset button action here?

    Thanks

    Anonymous
    #233913

    Sorry, the second solution work. The first one (wc_get_page_permalink) sends me to the home url :

    esc_url( wc_get_page_permalink(wc_get_page_id( ‘shop’ )) )

    Anonymous
    #233915

    The first one works as well with wc_get_page_permalink(‘shop’ ).

    Thanks a lot

    Trevor
    #233918

    Thanks for getting back to me. I will close this thread for now.

Viewing 5 posts - 1 through 5 (of 5 total)