WordPress -> An e-commerce site using WooCommerce [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am developing an E-commerce site in WordPress using WooCommerce plugin. By default the users are directed to myaccount page. In my website I want to redirect the users to homepage after login. How can this redirection be done?

This code should solve your problem.You can add this code in functions.php.
add_filter('woocommerce_login_redirect', 'user_redirection_page');
function user_redirection_page( $redirect_to ) {
return esc_url( home_url( '/' ) );
}

Related

how to make plugin not active when in admin dashboard [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm developing plugin for wordpress and i have already made settings page for admin in dashboard.
now i want to make some kind of button that is available on all pages but admin's pages like login page or 'wp-admin'.
what do you suggest?
Thanks.
You can use the is_admin() function in wordpress to determine whether the current request is directed to an admin page, so:
if(!is_admin()){
//YOUR PUBLIC(NON-ADMIN) ONLY CODE
}
WP codex on this function

How to change the text "place your order" to "Book" present in checkout page? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
My website is www.osdoc.in .
My website is built on wordpress and WooCommerce.
How can I change the text "Place Order" present in checkout page to "Book" ?
you can try this code by adding in functions.php
add_filter( 'woocommerce_order_button_text', 'woo_custom_order_button_text' );
function woo_custom_order_button_text() {
return __( 'book', 'woocommerce' );
}

Woocommerce - Clear cart on user logout [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am using woocommerce in wordpress site.
I need to clear cart contents of a logged in user when that user logs out.
I am unable to find any options for the same in plugin settings.
Anyone let me know a way to achieve the same.
Use wp_logout hook to empty the cart. Place the below code in your theme's function.php or in your own plugin.
function your_function() {
if( function_exists('WC') ){
WC()->cart->empty_cart();
}
}
add_action('wp_logout', 'your_function');
Edited: According to #helgatheviking 's solution

How to display WordPress Posts in a CakePHP Template/**/*.ctp file? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Is it even possible? If so, do I need to download a plugin to make it work?
(The Wordpress directory is located in webroot/blog/)
I don't want to customize my entire wordpress blog to look like my website when I could just (if possible) display all blog posts on a .ctp file.
Works perfectly with the WordPress API! Thanks.

I have installed Another WordPress Classifieds plugin I have to integrate with woocomerce [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have installed Another WordPress Classifieds plugin.
I have to integrate with woocommerce plugin. How I can do?
I have developed one extension for that, Now everything is working well.

Categories