Cashline

Docs

WordPress

There is no official WordPress plugin yet. Paste the snippet with a header/footer plugin, or enqueue it from a child theme so a theme update does not wipe it.

Custom HTML in the footer

Appearance → Theme File Editor is brittle. Prefer a “Insert Headers and Footers” style plugin, or wp_enqueue_script in the child theme.

<script>
  window.cashline = window.cashline || function () {
    (window.cashline.q = window.cashline.q || []).push(arguments);
  };
</script>
<script src="https://YOUR_ORIGIN/cashline.js" data-site="cl_your_site_id"></script>
<script>cashline('pageview');</script>

WooCommerce purchase

On the thank-you page, only fire purchase if WooCommerce marked the order paid. Cashline does not read WooCommerce by itself.

cashline('purchase', {
  amount: ORDER_TOTAL_RAND,
  currency: 'ZAR',
  reference: 'WC-ORDER-ID'
});