Hello, dear Support, I have an issue.
When I click on Take this Course, it does not redirect me to the product page, despite the fact that the product and the course are linked, and I had arranged the setting in Woocommerce.
When I click on taking the course it redirects me to the "Cart" page, without showing the "Continue Shopping" button.
What is weird is that when I enter to the shop page by writing its URL and I click on take any course, it redirects me to the "Cart" page with the button "Continue Shopping" showing.
Many thanks.
Did you enabled the setting to skip product page in wp-admin > WPLMS > Miscellaneous > Direct Checkout
You are right, when I desactivate this option, it directed me to the product page.
But what I want now please, is to skip to the product page, and the button "Continue Shopping" appears for me.
When I enabled that setting before, I hadn't notice that the "Cart" page doesn't contain the "Continue Shopping" button, how can I add it can be added without being directed to the product page first ?
Many thanks.
Try this snippet
add_filter ('woocommerce_add_to_cart_redirect', 'woo_redirect_to_checkout');
function woo_redirect_to_checkout() {
$checkout_url = WC()->cart->get_checkout_url();
return $checkout_url;
}
Add it in wp-admin > Plugins > editor > Select WPLMS Customizer Plugin > wplms-customizer.php
I am facing an issue like my take this course button is not redirecting to the course page its staying on the same page.
@RMA,
Yes, Found your topic, will continue there
Yes, I added the code there, but still the "Continue Shopping" button, does not appear
I added the code below and it showed me the "Continue Shopping" button.
___________________
/**
* Add Continue Shopping Button on Cart Page
* Add to theme functions.php file or Code Snippets plugin
*/
add_action( 'woocommerce_before_cart_table', 'woo_add_continue_shopping_button_to_cart' );
function woo_add_continue_shopping_button_to_cart() {
$shop_page_url = get_permalink( woocommerce_get_page_id( 'shop' ) );
echo '<div class="woocommerce-message">';
echo '
Continue Shopping → Would you like some more goods?';
echo '</div>';
}
If this is resolved, Can we close this topic?