# Payment and Trust Icons Under the Add to Cart Button

> Adds a short secure-checkout line with accepted payment methods under the add to cart button on product pages.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, product-page, trust, payments
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-trust-badges-after-cart-button/

## Code

```php
add_action( 'woocommerce_after_add_to_cart_form', function () {
    $methods = array( 'Visa', 'Mastercard', 'PayPal', 'Apple Pay' ); // Accepted methods.

    echo '<div class="wpide-trust-line" style="margin:12px 0 0;font-size:.9em;color:#50575e;">';
    echo '<span aria-hidden="true">&#128274;</span> ' . esc_html( 'Secure checkout' ) . ' &middot; ';
    echo esc_html( implode( ' / ', $methods ) );
    echo '</div>';
} );
```

## Notes

Edit $methods to list the payment methods you accept.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Payment and Trust Icons Under the Add to Cart Button" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
