Click A Tree
Click A Tree adds a simple “plant a tree” upsell to your WooCommerce shop. Customers can add one or more real trees to their cart or checkout. The customer pays for the tree, you keep a margin, and Click A Tree plants the tree and takes care of the certificate.
The plugin is deliberately thin. It handles the storefront and admin side inside your shop; the actual planting, accounting and certificates run on the Click A Tree service (this is a Software-as-a-Service model, see “External services” below). A free Click A Tree account and an API key connect the two.
What the plugin does in your shop
- Adds a hidden, virtual “tree” product (price configurable, default 5.00). One item = one tree.
- Shows an “add a tree” widget in both the classic and the block based cart and checkout.
- Reports paid orders that contain trees to Click A Tree so the trees get planted (HMAC signed request).
- Shows an impact dashboard in the WordPress admin: trees planted, CO2, your margin and your prepaid balance.
- An onboarding page under WooCommerce to store your API key and set the tree price.
What works without a Click A Tree account
You can install the plugin, set the tree price, and see the tree product and the cart and checkout widget in your shop right away. No data is ever sent anywhere until you enter an API key. The external service is only needed for the part it is responsible for: actually planting the trees, issuing certificates and returning your impact statistics.
Source code and build
The block based cart and checkout widget is compiled into the “build” folder. The full human readable source is shipped with the plugin in the “src” folder, together with the build configuration (“webpack.config.js” and “package.json”). The compiled files are generated with @wordpress/scripts. To rebuild them from source, run “npm install” and then “npm run build” in the plugin folder. No code is minified or obfuscated beyond this standard build step.
External services
This plugin connects to the Click A Tree API at https://api.clickatree.com, a service operated by Click A Tree. The connection is used for two things: to report purchased trees so they can be planted, and to show your shop’s impact statistics in the admin.
What data is sent, and when:
- When an order that contains trees reaches a paid status (WooCommerce status “processing” or “completed”), the plugin sends: your shop URL, a one way hash of the order ID, the number of trees, the tree amount and the order currency. This is what tells Click A Tree to plant the trees for that order.
- When you open the “Click A Tree Impact” page in the WordPress admin, the plugin sends your shop URL to retrieve your aggregated impact statistics (trees, CO2, margin, prepaid balance).
No personal data of your customers is transmitted. An order is identified only by a one way hash, never by customer name, address or email. Nothing is sent until you enter your Click A Tree API key on the settings page; entering the key and using the feature is what enables the data transfer.
This service is provided by Click A Tree. By using it you agree to their terms and privacy policy:
- Terms and conditions: https://clickatree.com/agb/
- Privacy policy: https://clickatree.com/datenschutz/
