I have Amelia plugin with Woocommerce payments enabled. Is it possible to redirect directly to checkout page instead cart page after booking appoinments ? I try snippets
add_filter('add_to_cart_redirect', 'cw_redirect_add_to_cart'); function cw_redirect_add_to_cart() { global $woocommerce; $cw_redirect_url_checkout = $woocommerce->cart->get_checkout_url(); return $cw_redirect_url_checkout; }
This is set by WooCommerce not by our plugin, but please try this out:
modify the WooCommerceService.php file in ..wp-content/plugins/ameliabooking/src/Infrastructure/WP/Integrations/WooCommerce/
and find the function GetCartUrl()
and change 'cart' to 'checkout' in it so it will looks like this:
/**
* Get cart page
*
* @return string
*/
public static function getCartUrl()
{
return wc_get_checkout_url();
}
Hope this helps!
Please note that with each update this will be overwritten, but we will probably add an option for this in the next update which will need to be changed in the database (from false to true).
I have Amelia plugin with Woocommerce payments enabled. Is it possible to redirect directly to checkout page instead cart page after booking appoinments ? I try snippets
add_filter('add_to_cart_redirect', 'cw_redirect_add_to_cart');
function cw_redirect_add_to_cart() {
global $woocommerce;
$cw_redirect_url_checkout = $woocommerce->cart->get_checkout_url();
return $cw_redirect_url_checkout;
}
but it didn't work.
Hello again zbyneksmetana
This is set by WooCommerce not by our plugin, but please try this out:
modify the WooCommerceService.php file in ..wp-content/plugins/ameliabooking/src/Infrastructure/WP/Integrations/WooCommerce/
and find the function GetCartUrl()
and change 'cart' to 'checkout' in it so it will looks like this:
Hope this helps!
Please note that with each update this will be overwritten, but we will probably add an option for this in the next update which will need to be changed in the database (from false to true).
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thanks
You're welcome, zbyneksmetana
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables