Okay
  Public Ticket #3643036
Customize Product Information Table
Closed

Comments

  •  5
    Eduardo Andres started the conversation

    What is the best way to move this Table information in product Sumary see Image as example. FromThis - LikeThis.

    Attached files:  FromThis.png
      LikeThis.png

  •  2,038
    WebWizards replied

    Hello Eduardo,

    It is possible to move that table with a code snippet.

    I believe this one may be able to achieve it per your needs:

    add_action('plugins_loaded', function(){
        global $b2bking_public;
        remove_action('woocommerce_after_add_to_cart_button', array($b2bking_public,'b2bking_show_custom_information_table'));
        add_action('woocommerce_single_product_summary', array($b2bking_public,'b2bking_show_custom_information_table'));
    });
    global $b2bking_public;
    remove_action('woocommerce_after_add_to_cart_button', array($b2bking_public,'b2bking_show_custom_information_table'));
    add_action('woocommerce_single_product_summary', array($b2bking_public,'b2bking_show_custom_information_table'));
    

    This is a PHP snippet that can be added to functions.php, or by following our guide here: https://woocommerce-b2b-plugin.com/docs/how-to-add-a-snippet-php-or-js/


    In the above code, basically we change the hook where the table is inserted, and set it to 'woocommerce_single_product_summary'. Depending on your site and theme, this hook may work or another one may be needed. If that doesn't position it as you want it, you can try other hooks from this page https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/


    Let me know if that can help solve this for you,


    Kind regards,

    Stefan

  •  5
    Eduardo Andres replied

    it worked like a charm,


    thanks.

    Attached files:  WorksFine.png

  •   WebWizards replied privately