order details not showing
-
Lms is installed in a subfolder , under my orders on customer dashboard when you try to review order details the system redirecto to https://www.mydomain.com/woocommerce-order-details/order-id/ intead of https://www.mydomain.com/SUDFOLDER/woocommerce-order-details/order-id/
order id is the number of the order example:
https://www.mydomain.com/woocommerce-order-details/2034/
I see this file /masterstudy-lms-learning-management-system-pro/includes/hooks/woocommerce.php
Register a new endpoint:
function register_woocommerce_order_details_endpoint() {
add_rewrite_endpoint( ‘woocommerce-order-details’, EP_ROOT | EP_PAGES );
}// Redirect to the order details page
add_action( ‘template_redirect’, ‘order_details_template_redirect’ );function order_details_template_redirect() {
global $wp_query;if ( isset( $wp_query->query_vars['woocommerce-order-details'] ) ) { $order_id = intval( $wp_query->query_vars['woocommerce-order-details'] ); $order = wc_get_order( $order_id ); if ( $order && STM_LMS_Cart::woocommerce_checkout_enabled() ) { STM_LMS_Templates::show_lms_template( 'account/private/parts/orders-details/orders-details', array( 'order_id' => $order_id, ) ); exit; } else { global $wp_query; $wp_query->set_404(); status_header( 404 ); get_template_part( '404' ); exit; } }
}
thank you
- You must be logged in to reply to this topic.