Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    if you disable Pre-Order the order status display once?

    Thread Starter tadej

    (@st1fffy)

    Hi
    I have double-checked, yes that is the case. If your plugin is disabled status is displayed once and it works as it should.
    Thanks

    Plugin Author YITHEMES

    (@yithemes)

    Hi there,

    Please, try to add the following code to the functions.php of your child theme:

    if ( class_exists( 'YITH_Pre_Order' ) ) {
    	remove_action( 'woocommerce_my_account_my_orders_column_order-status', array( YITH_Pre_Order::instance()->myaccount, 'add_pre_order_button_on_orders_page' ) );
    	add_action( 'woocommerce_my_account_my_orders_column_order-status', 'add_pre_order_button_on_orders_page', 99 );
    
    	function add_pre_order_button_on_orders_page_custom( $order ) {
    		$order = wc_get_order( $order );
    		$order_has_preorder = yit_get_prop( $order, '_order_has_preorder', true );
    		if ( 'yes' == $order_has_preorder ) {
    			echo wc_get_order_status_name( $order->get_status() );
    			echo '<br><mark>Has Pre-Orders</mark>';
    		}
        }
    }

    Let us know.

    Thread Starter tadej

    (@st1fffy)

    Hi
    it works! Thanks for help ??
    Tadej

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Compatibility problem with’ is closed to new replies.