Compress a folder in Godaddy SSH

In order to “zip” a directory, the correct command would be


tar -zcvf archive.tar.gz directory/

 

Advertisements

Redirect users after add to cart in woocommerce (WordPress)

Redirect users to cart after add to cart

This is the default option that is build into WooCommerce. You can find the option in the WooCommerce -> Settings -> Products -> Display area. When the option “Redirect to the cart page after successful addition” is checked it will redirect all users to the cart after adding a product to the cart.

 

Redirect users to a custom page

 

 


function my_custom_add_to_cart_redirect( $url ) {
$url = get_permalink( 1 ); // URL to redirect to (1 is the page ID here)
return $url;
}
add_filter( 'woocommerce_add_to_cart_redirect', 'my_custom_add_to_cart_redirect' );

How Internet Marketing / Websites Can Help Grow Your Business

One of the biggest problems I hear from clients is that they are so busy working in their business, they don’t have time to work on it.

Now, you’re probably thinking “Between taking care of clients, answering email and putting out fires, where do I find time work on my own business?”

The answer is simple…

Automate your marketing and sales campaigns so your business starts growing on its own.

And if you’ve got a Website, chances are you’re already halfway there.

Here are Seven Ways Your Website Can Grow Your Business for You:

1) Powerful Introductions
2) Draw in the Crowds
3) Make Sales Without Selling
4) Give ‘Em a Taste
5) Build Your List
6) Deliver the Goods
7) Following Up Forever

Remember, you don’t have to learn how to set all this up yourself. You just have to know what needs to be done. Then hire us to do the time-consuming, technical and complicated work for you. 🙂

http://www.aryancreative.com/

Mobile: +91-9001491799

Thank you,
Shankar

Modifying the WooCommerce Product Query for Product Loop

How to change what products show up in the shop loop ?

Add this to your theme's functions.php or any plugin file.


add_action( 'woocommerce_product_query', 'show_active_events_only' );

function show_active_events_only( $q ){
$todays_date = date(‘Y-m-d’, time());
$meta_query = $q->get( ‘meta_query’ );
$meta_query[] = array(
‘key’ => ‘wcv_custom_product_enddate’,
‘value’ => $todays_date,
‘compare’ => ‘>=’
);

$q->set( ‘meta_query’, $meta_query );
}