Collie-IT, Anne K. Frey
Forum Replies Created
-
Dear support,
I see this as issue. Because if I add this to the minicard to motivate a anonymus/firstime customers it will not shown.
The Problem is that
if ( $is_empty && apply_filters( ‘wpcfb_hide_if_cart_empty’, true ) ) {
return ”;
}Is triggert when the shippingcost are 0, because there is no adress set and the schippingclass is not selectet.
Best reagrds
Collie-IT
- This reply was modified 1 month, 3 weeks ago by Collie-IT, Anne K. Frey.
Forum: Plugins
In reply to: [Flipbox – Awesome Flip Boxes & Image Overlay for WordPress] PHP Fatal errorHi,
i have the same Problem. We use a php 8.3 version. The error blocks the whole Backend from wordpress.
The recoment plugin function throth this error. As hotfix I commentet out lines 109 – 112
/* if ( ! isset( $installed_plugins[ $value['modules-path'] ] ) ) :
$plugin[ $i ] = $value;
++$i;
endif;*/Best regards
Collie-IT
Forum: Plugins
In reply to: [WooCommerce] Woocommerce Analyse add a custom field column to OrderlistThe goel is to export the information in the order list + 2 custom field via csv.
The officel documentation don’t work
Forum: Plugins
In reply to: [WooCommerce] Woocommerce Analyse add a custom field column to OrderlistDear LovingBro,
I speak of the analyse/statistk order list wehre I can generate csv for an export.
Best Regards
Collie-IT
Dear Support,
unfurtunatly if I use
apply_filters( 'learn-press/layout/list-courses/item/section/bottom', '…' );I don’t get the cursespecifc inputs. with paramaters are needed for the function?
Best Regards
Collie-IT
Dear Supprt,
here is the image. Suddently it has no effect.

Best regards
Collie-IT
Forum: Plugins
In reply to: [YITH WooCommerce Wishlist] Add to wishlist button not showing on SafariHave you an E-Mail or a web formular?
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] electronic invoicingDear support I ment XRechnung/ZUGFeRD because this tow are the only options in Germany.
When will be the feature implemented?
Forum: Plugins
In reply to: [WooCommerce PayPal Payments] Pay upon Invoice Checkout not load properlySorry no luck with the update.
Dear @briantp
i found an second issue in this area. If the user buyes vor the first time following code will not executed right.
$bg = LP_Woo_Payment_Background_Process::instance(); $bg->data( $params )->dispatch();To fix this I copied the code after the $params generation:
$lp_order = learn_press_get_order( $lp_order_id ); foreach ( $lp_order_items as $it ) { $item_id = $it['item_id'] ?? 0; $order_total = $it['order_total'] ?? 0; $order_subtotal = $it['order_subtotal'] ?? 0; $item = array( 'item_id' => $item_id, 'order_item_name' => get_the_title( $item_id ), 'subtotal' => $order_subtotal, 'total' => $order_total, ); $lp_order->add_item( $item ); }I debuged a bit further in this issue.
It themes to be that the woo_payment plugin has some communication issue after the update.Following observations cut be made in \wp-content\plugins\learnpress-woo-payment\incs\class-lp-wc-hooks.php public function create_lp_order( $wc_order_id, $posted ) L. 183ff
L. 189 The LP_ORDER_CPT comparison (get_post_type( $lp_order_id ) === LP_ORDER_CPT ) is allways falls
L. 218 $item[‘product_id’] is everytime 0.
L.223 LP_Woo_Assign_Course_To_Product::$meta_key_lp_woo_courses_assigned the meta_key ‘_lp_woo_courses_assigned’ is not stored in the database and this list $list_course is everytime empty.
I have made following hotfix to reduce the issue.
/** * Create LP order base on WC order data * Hotfixed Collie-IT, Anne K. Frey 23.06.2022 * Fix issue with lose of course info in lp_order * * @param $wc_order_id * @param $posted * * @throws Exception */ public function create_lp_order( $wc_order_id, $posted ) { $user_id = get_current_user_id(); $user = learn_press_get_user( $user_id ); // Get LP order key related with WC order $lp_order_id = get_post_meta( $wc_order_id, '_learn_press_order_id', true ); // if ( $lp_order_id && get_post_type( $lp_order_id ) === LP_ORDER_CPT ) { // return; // } // Get wc order $wc_order = wc_get_order( $wc_order_id ); if ( ! $wc_order ) { return; } // Get wc order items $wc_items = $wc_order->get_items(); if ( ! $wc_items ) { return; } // Find LP courses in WC order and preparing to create LP Order $lp_order_items = array(); $order_total = 0; $order_subtotal = 0; $opt_buy_course = LP_Gateway_Woo::is_by_courses_via_product(); /** * @var $item WC_Order_Item_Product */ foreach ( $wc_items as $item ) { if ( $opt_buy_course ) { // Get lists course of product $course_id = wc_get_order_item_meta( $item_id, '_course_id' ); $can_purchase = apply_filters( 'learnpress/wc-order/can-purchase-product', true, $course_id ); if ( ! $can_purchase ) { continue; } $course = learn_press_get_course( $course_id ); if ( ! $course || array_key_exists( $course_id, $lp_order_items ) ) { continue; } $order_total += floatval( $course->get_price() ); $order_subtotal += floatval( $course->get_price() ); $lp_order_items[ $course_id ] = array( 'item_type' => get_post_type( $course_id ), 'item_id' => $course_id, 'order_subtotal' => $order_subtotal, 'order_total' => $order_total, ); } else { $item_id = $item['product_id'] ?? 0; $item_type = get_post_type( $item['product_id'] ); if ( ! in_array( $item_type, learn_press_get_item_types_can_purchase() ) ) { return false; } switch ( $item_type ) { case 'product': break; case LP_COURSE_CPT: $order_total += floatval( $item->get_total() ); $order_subtotal += floatval( $item->get_subtotal() ); break; default: $order_total = apply_filters( 'learnpress/wc-order/total/item_type_' . $item_type, $order_total, $item ); $order_subtotal = apply_filters( 'learnpress/wc-order/subtotal/item_type_' . $item_type, $order_subtotal, $item ); break; } $lp_order_items[ $item_id ] = array( 'item_type' => get_post_type( $item_id ), 'item_id' => $item_id, 'order_subtotal' => $order_subtotal, 'order_total' => ! empty( $order_total ) ? $order_total : $order_subtotal, ); } } // If there is no course in wc order if ( empty( $lp_order_items ) ) { return; } // create lp_order $order_data = array( 'post_author' => $user_id, 'post_parent' => '0', 'post_type' => LP_ORDER_CPT, 'post_status' => '', 'ping_status' => 'closed', 'post_title' => __( 'Order on', 'learnpress-woo-payment' ) . ' ' . current_time( 'l jS F Y h:i:s A' ), 'meta_input' => array( '_order_currency' => get_post_meta( $wc_order_id, '_order_currency', true ), '_prices_include_tax' => floatval( $wc_order->get_total_tax() ) > 0 ? 'yes' : 'no', '_user_ip_address' => learn_press_get_ip(), '_user_agent' => $_SERVER['HTTP_USER_AGENT'] ?? '', '_user_id' => get_post_meta( $wc_order_id, '_customer_user', true ), '_order_total' => ! empty( $order_total ) ? $order_total : $order_subtotal, '_order_subtotal' => $order_subtotal, '_order_key' => apply_filters( 'learn_press_generate_order_key', uniqid( 'order' ) ), '_payment_method' => get_post_meta( $wc_order_id, '_payment_method', true ), '_payment_method_title' => get_post_meta( $wc_order_id, '_payment_method_title', true ), '_created_via' => 'manual', '_woo_order_id' => $wc_order_id, 'user_note' => '', ), ); $lp_order_id = wp_insert_post( $order_data ); update_post_meta( $wc_order_id, '_learn_press_order_id', $lp_order_id ); if ( $opt_buy_course ) { add_post_meta( $lp_order_id, '_lp_create_order_buy_course_via_product', 1 ); } // Handle background, add items to LP Order $params = array( 'lp_order_id' => $lp_order_id, 'lp_order_items' => $lp_order_items, 'lp_no_check_referer' => 1, 'lp_status' => 'lp-' . $wc_order->get_status(), ); $bg = LP_Woo_Payment_Background_Process::instance(); $bg->data( $params )->dispatch(); do_action( 'learn-press/checkout-order-processed', $lp_order_id, null ); do_action( 'learn-press/woo-checkout-create-lp-order-processed', $lp_order_id, null ); }Annother issue is that the storing of LP()->settings has changed to LP_Settings::instance() but in the woo_payment_addon has not happend. Plaese correct the issue.
- This reply was modified 3 years, 11 months ago by Collie-IT, Anne K. Frey.
Hi vasiloiucatalin
could it be that is it the same issue like Issue
Maybe the best way is an downgrade to the version that has run correctly to get your page running again. And waiting for the patch?
Best regards
Collie-ITHi
is there any progress?
Best regards
Collie-ITHi
there is the screenshoot
https://prnt.sc/S2JdfcUH5GYHBest regards
Collie-ITHi
it is simple buy a course via woocommerce. And then is the list in Learnpress order not matched with the buyed course it is empty. I could provide a image but the wordpress system not allowed to upload it here.Best regards
Collie-IT