In this tutorial we learn how to redirect shop page to specific page

1. WooCommerce Shop URL Redirect to !

// Redirect WooCommerce Shop URL
function wc_shop_url_redirect() {
    if( is_shop() ){
        wp_redirect( home_url( '/tutorials/' ) ); // Assign custom internal page here
        exit();
    }
}
add_action( 'template_redirect', 'wc_shop_url_redirect' )

Woocommerce is best plugin in current market after it's sucess lots of demand

we cover in this articale how to add/remove fuctionality in woocommerce theme, these code snippets help you building your dynamic site

1 . Third party theme support WooCommerce snippet

code is used for declaring WooCommerce support in your theme

function woocommerce_support() {

add_theme_support( 'woocommerce' );

}
add_action( 'after_setup_theme', 'woocommerce_support' );

2 . How to Change shop page title

you can replace woocommerce default shop page via WC snippet

function wc_shop_page_title( $page_title ) {

if( 'Shop' == $page_title) {

return "Usercode shop";

}

}

add_filter( 'woocommerce_page_title', 'wc_shop_page_title');

3. How to change add-to-cart buttom in WC single page

Single page cart button text change code

/ To change add to cart text on single product page
add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_custom_single_add_to_cart_text' ); 
function woocommerce_custom_single_add_to_cart_text() { return __( 'Buy Now', 'woocommerce' ); }

4. How to change add-to-cart buttom in WC archives page

WC Archive page button text change

// To change add to cart text on product archives page
add_filter( 'woocommerce_product_add_to_cart_text', 'woocommerce_custom_product_add_to_cart_text' );  
function woocommerce_custom_product_add_to_cart_text() {  return __( 'Buy Now', 'woocommerce' );}

5. Skip cart page and redirect to the checkout page after click add to cart

function add_to_cart_checkout_redirect() {

wp_safe_redirect( get_permalink( get_option( 'woocommerce_checkout_page_id' ) ) );

die();

}

add_action( 'woocommerce_add_to_cart', 'add_to_cart_checkout_redirect', 16 );