Home Forums WC Vendors Pro Support Altering Pro Store Header location in template

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #58892
    Lauri
    Participant

    Hi,
    what would be the best way to change the location of the Pro Store Header in my template? store-header.php defines the content of the store header but I would like to alter the location of it.

    I found that /plugins/wc-vendors-pro/includes/class-wcvendors-pro.php has these lines that are doing the printing, but where can I define the location of it?

    				$this->loader->add_action( 'woocommerce_before_main_content',		$this->wcvendors_pro_vendor_controller, 	'store_main_content_header', 30 );
    				$this->loader->add_action( 'wcv_after_vendor_store_header',			$this->wcvendors_pro_vendor_controller, 	'vacation_mode' );
    
    #58973
    Anna
    Member

    Hello,
    You can try using another WooCommerce action hook- I am not certain what the results will be, but you can attempt to move it with another of their actions hooks for the archive-product.php page.

    #59024
    Lauri
    Participant

    Hi Anna,
    thanks for tip. I was able to move the vendor store header to the “header”-section of my template by adding
    do_action( 'woo_header_inside' ); to archive-product.php.

    And changing the line in /plugins/wc-vendors-pro/includes/class-wcvendors-pro.php
    $this->loader->add_action( 'woo_header_inside', $this->wcvendors_pro_vendor_controller, 'store_main_content_header', 30 );

    One more question, can I copy my modifed class-wcvendors-pro.php-file somewhere inside my template folder? So that updating WCVendors-module wouldn’t override my changes in the future.

    #59083
    Anna
    Member

    @laurimajuri
    Since that is a core file, and not a template file- no, unfortunately it cannot be copied over to your template folder or theme files for update-safe modifications.
    For core files, filters or actions can be used in your theme functions.php for update safe modifications.
    I am not sure if that particular action can be removed and then re-added with your new action hook, however.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.