Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › How to change url link of become a vendor on login page?
- This topic has 1 reply, 2 voices, and was last updated 4 years, 5 months ago by Sarmistha Chakraborty.
Viewing 1 reply thread
- AuthorPosts
- May 29, 2020 at 9:38 am #136409ultimatewebmakerParticipant
Hi
I need to know How to change url link of The button of become a vendor on login page? - May 29, 2020 at 12:37 pm #136449Sarmistha ChakrabortyMember
Hello,
Add this code in your theme’s functions.php, and modify the “href” of a tag as per your requirement.
add_action('init',function(){ global $WCFM, $WCFMmp; remove_action('woocommerce_register_form_end', array( $WCFMmp->frontend, 'wcfmmp_become_vendor_link' ) ); remove_action('woocommerce_after_my_account', array( $WCFMmp->frontend, 'wcfmmp_become_vendor_link' ) ); add_action( 'woocommerce_after_my_account', 'custom_wcfmmp_become_vendor_link' ); add_action( 'woocommerce_register_form_end', 'custom_wcfmmp_become_vendor_link' ); }); function custom_wcfmmp_become_vendor_link() { global $WCFM, $WCFMmp; $hide_become_vendor = wcfm_get_option( 'wcfmvm_hide_become_vendor', 'no' ); if( apply_filters( 'wcfm_is_allow_my_account_become_vendor', true ) && ( $hide_become_vendor !== 'yes' ) && WCFMmp_Dependencies::wcfmvm_plugin_active_check() ) { if( wcfm_is_allowed_membership() && !wcfm_has_membership() && !wcfm_is_vendor() ) { echo '<div class="wcfmmp_become_vendor_link">'; $wcfm_memberships = get_wcfm_memberships(); if( apply_filters( 'wcfm_is_pref_membership', true ) && !empty( $wcfm_memberships ) && apply_filters( 'wcfm_is_allow_my_account_membership_subscribe', true ) ) { echo '<a href="' . apply_filters( 'wcfm_change_membership_url', get_wcfm_membership_url() ) . '">' . apply_filters( 'wcfm_become_vendor_label', __( 'Become a Vendor', 'wc-multivendor-marketplace' ) ) . '</a>'; //change href } else { echo '<a href="' . get_wcfm_registration_page() . '">' . apply_filters( 'wcfm_become_vendor_label', __( 'Become a Vendor', 'wc-multivendor-marketplace' ) ) . '</a>'; //change href } echo '</div>'; } } }
Thanks.
- AuthorPosts
Viewing 1 reply thread
- You must be logged in to reply to this topic.