Inquiry menu title hook

WooCommerce Multivendor Marketplace – Home Forums WCFM Inquiry menu title hook

This topic contains 9 replies, has 2 voices, and was last updated by WCfM Forum WCfM Forum 1 month, 4 weeks ago.

  • Author
    Posts
  • #31507 Reply

    fabeluna
    Participant

    Hello,
    I have a custom menu added to the content of the my-account woocommerce page. If I load the new my-accoount inquiry endpoint, all the menu titles of my custom menu are changed to “Inquiries” (See screenshot). I had a look at your code and I think it’s up to the “the_title” hook, located in the file “class-wcfm-enquiry.php” at line 53 and 282. It would be grateful if you could fix this in next update?
    Thanks,
    Leni

    Attachments:
    You must be logged in to view attached files.
  • #31510 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    That’s something impossible, please check this – https://wclovers.com/wp-content/uploads/2017/11/wcfm_enquiry_myaccount.png
    My Account from my system.

    You may even check at our demo as well – http://wcfmmp.wcfmdemos.com/my-account/

    Can you please disable your custom code once and check this?
    May you have missed something and that creates the mess.

    Thank You

  • #31516 Reply

    fabeluna
    Participant

    Hello,
    thanks for quick reply, great support!
    The problem is only visible, if there is any other content element on the woocommerce my-account page, that uses the wordpress function the_title().. When I remove my custom menu from the my account page, everything works fine. I don’t know if it is not allowed or recommended to use another content element besides the woocommerce my account shortcode at the my account page?
    Thanks,
    Leni

  • #31557 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    You are welcome πŸ™‚

    When I remove my custom menu from the my account page, everything works fine. I don’t know if it is not allowed or recommended to use another content” – you may off course use that but your code should be like this –

    $is_endpoint = isset( $wp_query->query_vars['inquiry'] );
    		
    			if ( $is_endpoint && ! is_admin() && is_main_query() && in_the_loop() && is_account_page() ) {
    				// New page title.
    				$title = __( 'Inquiries', 'wc-frontend-manager' );
    			}

    “$is_endpoint” checking is very important here.

    Thank You

  • #31566 Reply

    fabeluna
    Participant

    Hello,
    thanks for the code.
    I Think you have misunderstood or I may not have expressed myself very well. See attached some screenshots for the purposes of illustration. On my Woocommerce account page I have placed the visual composer “dynamic_sidebar” element in addition to the “woocommerce_my_account” element. This sidebar contains the wordpress menu widget(WP_Nav_Menu_Widget) – I don’t use any other custom code by myself.
    Thanks,
    Leonie

    Attachments:
    You must be logged in to view attached files.
  • #31602 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    HI,

    That’s really strange!
    I have even show you the code using which we are setting menu title.

    Anyway, we will add some more restriction on this and hope you will not have this issue anymore.

    Thank You

  • #31621 Reply

    fabeluna
    Participant

    Hello,
    Perfect, many thanks for this! πŸ™‚
    Leni

  • #31728 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    WCFM new version is there, please update yours and take a look.

    Thank You

  • #31731 Reply

    fabeluna
    Participant

    Hello,
    it works like a charm! Thank you so much for the quick update, awesome!
    Leni

    Attachments:
    You must be logged in to view attached files.
  • #31751 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    You are welcome πŸ™‚

    If you get a chance then please leave for me – https://wordpress.org/support/plugin/wc-frontend-manager/reviews/

    Thank You

Reply To: Inquiry menu title hook
Your information: