• Resolved L O Lawson

    (@l-o-lawson)


    I’m wanting to move the byconsolewooodt_checkout_field block from after the order notes to after the shipping selection block (the woocommerce_review_order_after_shipping hook) on the checkout page.

    I’ve added the following in my child theme’s functions.php:

    
    remove_action( 'woocommerce_after_order_notes', 'byconsolewooodt_checkout_field' );
    add_action( 'woocommerce_review_order_after_shipping', 'byconsolewooodt_checkout_field' );
    

    This causes the following error:

    Fatal Error: Uncaught Error: Call to a member function get_value() on string in <mysitepath>/plugins/byconsole-woo-order-delivery-time/ByConsoleWooODT.php:743 Stack trace: #0 <mysitepath>/wp-includes/class-wp-hook.php(298): byconsolewooodt_checkout_field('') #1 <mysitepath>/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array) #2 <mysitepath>/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 <mysitepath>/plugins/woocommerce/templates/checkout/form-checkout.php(51): do_action('woocommerce_che...') #4 <mysitepath>/plugins/woocommerce/includes/wc-core-functions.php(205): include('<mysitepath>/...') #5 <mysitepath>/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php(254): wc_get_template('chec in <mysitepath>/plugins/byconsole-woo-order-delivery-time/ByConsoleWooODT.php on line 743

    What is the correct way to change where this block appears on the checkout page?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author mdalabar

    (@mdalabar)

    Hi,
    open the file ByConsoleWooODT.php and point to line no 743, you and changed this line

    
    ), $checkout->get_value( 'byconsolewooodt_delivery_type' ));
    

    to

    
    ));
    

    save and upload the file.

    Thread Starter L O Lawson

    (@l-o-lawson)

    Thanks! Subsequent similar errors were generated, but using the same edit at each flagged line resolved them. Mission accomplished!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Moving byconsolewooodt_checkout_field on checkout page’ is closed to new replies.