• Resolved kranate

    (@kranate)


    could you please implement a way to change the front page while shop is closed.
    my current bypass is to modify the plugin by adding a action in close_shop.

    so I’m able to use this action to do the job.

    if (!is_admin()) {
      add_action( 'after_setup_theme', function() {
      do_action( 'wsvpro_shop_status' );
    }, 31 );
    			}

    class-wsvpro-public.php

    /**
    		 * Close the shop!
    		 *
    		 * @param   bool $ignore_notice   Whether to skip printing the store notice or not.
    		 * @return  void
    		 */
    		public function close_shop( $ignore_notice = false ) {
    			// Return false in case the product(s) cannot be bought.
    			add_filter( 'woocommerce_is_purchasable', array( $this, 'is_purchasable' ), PHP_INT_MAX, 2 );
    			add_filter( 'woocommerce_variation_is_purchasable', array( $this, 'is_purchasable' ), PHP_INT_MAX, 2 );
    			add_action( 'admin_bar_menu', array( $this, 'admin_bar_node' ), PHP_INT_MAX );
    			//webmasting
    			if (!is_admin()) {
    				add_action( 'after_setup_theme', function() {
    					do_action( 'wsvpro_shop_status' );
    				}, 31 );
    			}
    
    			// Make sure that the vacation notice is not empty.
    			if ( isset( $this->_notice['message'] ) && ! empty( $this->_notice['message'] ) && ! $ignore_notice ) {
    				add_action( 'woocommerce_before_shop_loop', array( $this, 'print_notice' ), 5 );
    				add_action( 'woocommerce_before_single_product', array( $this, 'print_notice' ) );
    				add_action( 'woocommerce_before_cart', array( $this, 'print_notice' ), 5 );
    				add_action( 'woocommerce_before_checkout_form', array( $this, 'print_notice' ), 5 );
    				add_action( 'wp_print_styles', array( $this, 'print_styles' ), 99 );
    			} // End If Statement
    		}
    • This topic was modified 3 years, 8 months ago by kranate.
    • This topic was modified 3 years, 8 months ago by kranate.
Viewing 1 replies (of 1 total)
  • Plugin Contributor Saji

    (@gookaani)

    If you have a Premium version, you can contact us for support via email.

Viewing 1 replies (of 1 total)
  • The topic ‘front page while shop closed’ is closed to new replies.