Okay
  Public Ticket #3433101
Placed By Column Value Override
Closed

Comments

  •  3
    Nicholas started the conversation

    We need the ability to override the 'placed by' column value in the myaccount order history grid. Is it possible to add a filter for this?

    If there is a way to do this already please may you let us know.

    Best regards,

    Nick

  •  2,218
    WebWizards replied

    Hi Nick,

    Thank you for purchasing our plugin!


    It is possible to replace the value there by adding this PHP code snippet to your site:

    global $b2bking_public;
    remove_action( 'woocommerce_my_account_my_orders_column_order-placed-by', array($b2bking_public, 'b2bking_orders_placed_by_column_content')  );
    add_action( 'woocommerce_my_account_my_orders_column_order-placed-by', function( $order ) {
        // echo your custom content here
    }, 10, 1);
    

    This code basically removes the standard value and allows you to display your own custom value.


    The above code can be added to functions.php If you are adding it to a snippets plugin you may need to write the snippet like this:

    add_action('plugins_loaded', function(){
        global $b2bking_public;
        remove_action( 'woocommerce_my_account_my_orders_column_order-placed-by', array($b2bking_public, 'b2bking_orders_placed_by_column_content')  );
        add_action( 'woocommerce_my_account_my_orders_column_order-placed-by', function( $order ) {
            // echo your custom content here
        }, 10, 1);
    });
    


    Let me know if that can solve it for you,

    Kind regards,

    Stefan

  •  3
    Nicholas replied

    Thanks Stefan, that works perfectly.

  •  2,218
    WebWizards replied

    Glad to hear that : ) If there's anything else I can help with, please let me know.

    Also, if you're happy with the plugin so far, we would really appreciate it if you considered leaving a quick rating here on our WordPress page: https://wordpress.org/plugins/b2bking-wholesale-for-woocommerce/#reviews  - it's a huge help to us.