• Resolved iziriz156

    (@iziriz156)


    Hi

    How to use a 10% discount in a Backend Order?
    But there are still questions, in the backend after clicking the button the product immediately becomes processed, and the discount does not apply, because there are not 2 products in the cart.

    In 5.2.1 after backend order an error appears in the search form

    PHP Fatal error: Uncaught Error: Call to a member function get_cart() on null in /wp-content/plugins/bus-ticket-booking-with-seat-reservation/mp_global/class/MP_Global_Function.php:398

    This code fixed it in 5.2.1
    public static function check_product_in_cart( $post_id ) { $status = MP_Global_Function::check_woocommerce();
    if ( $status == 1 && function_exists( ‘WC’ ) && WC()->cart ) { $product_id = MP_Global_Function::get_post_info( $post_id, ‘link_wc_product’ );
    if ( ! is_null( WC()->cart ) ) {
    foreach ( WC()->cart->get_cart() as $cart_item ) {
    if ( $cart_item[‘product_id’] == $product_id ) {
    return true; }
    }
    }
    }
    return false;
    }

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for your inquiry.
    Currently, applying a 10% discount through backend orders is not available. The backend does not support adding two-way tickets simultaneously, which is required for the discount to apply.

    Regarding the error you encountered in version 5.2.1, we recommend creating a support ticket in our system. Our customer support team will gladly assist you and promptly solve the issue.

    We appreciate your understanding and look forward to helping you further.
    Best regards,

    Kayes

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.