• Resolved saniat

    (@saniat)


    Hi,
    If I want to place the notice before add to cart button, is this possible?

    The page I need help with: [log in to see the link]

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

    (@cloudredux)

    Hi @saniat,

    Unfortunately, there is no direct way to do this via plugin settings as of now. We plan to add it in a future version of the plugin.

    For now you can add the custom code to achieve this. See below:

    1. To display global notice before the Add to Cart button, add this:
      remove_action( 'woocommerce_single_product_summary', 'crwcpn_global_product_notice_top', 12 );
      add_action( 'woocommerce_before_add_to_cart_button', 'crwcpn_global_product_notice_top' );
    2. To display product notice before the Add to Cart button, add this:
      remove_action( 'woocommerce_single_product_summary', 'crwcpn_product_notice_top', 12 );
      add_action( 'woocommerce_before_add_to_cart_button', 'crwcpn_product_notice_top' );

    You can practically hook the functions crwcpn_global_product_notice_top and crwcpn_product_notice_top to any of the available hook locations on the WooCommerce product page. See this page for visual hook guide reference: https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/.

    You would need to add the code to your theme’s functions.php (preferably a child theme) or use a plugin like WP Designer or Code Snippets to add the custom code to your website.

    Let us know if that worked for you.

    Plugin Author CloudRedux

    (@cloudredux)

    Hi @saniat,

    We hope your issue is resolved. We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Notice before add to cart button’ is closed to new replies.