Article Table of Contents

    Step 1: Install the Sitewide Trustmark

    The Seal Code should be placed in the global footer so the Seal is displayed on all pages of your site. This code block will also introduce the Kicker graphics in the product details and cart pages.

    Simply copy and paste all the code below into your theme’s functions.php file

    // Shopping Guarantee in the global site footer
    add_action( 'wp_enqueue_scripts', function() {
    if (!is_order_received_page()) {
    wp_enqueue_script( 'shopping-guarantee-script', '//guarantee-cdn.com/Web/Seal/gjs.aspx?SN=########', array(), null, true );
    }
    }, 1000);
    
    // Shopping Guarantee in the WooCommerce thank-you page
    add_action( 'woocommerce_thankyou', function( $order_id ) {
    $order = new WC_Order( $order_id );
    if ($order) {
    $currency = $order->get_currency() ? $order->get_currency() : get_woocommerce_currency();
    echo <<<GUARANTEE
    <script type="text/javascript" src="//guarantee-cdn.com/Web/Seal/gjs.aspx?SN=########"></script>
    <script type="text/javascript">
    if (window._GUARANTEE && _GUARANTEE.Loaded) {
    _GUARANTEE.Guarantee.order = "{$order->get_order_number()}";
    _GUARANTEE.Guarantee.subtotal = "{$order->get_total()}";
    _GUARANTEE.Guarantee.currency = "{$currency}";
    _GUARANTEE.Guarantee.email = "{$order->billing_email}";
    _GUARANTEE.WriteGuarantee();
    }
    </script>
    GUARANTEE;
    }
    } );
    

    Congrats! You’re all setup and ready to offer the best shopping experience to your customers with added BuySafe protections.

    Have some more questions? Contact Us and our support team will be happy to help.

    in Integration