This plugin is part of the WeRePack.org initiative to avoid packaging waste and helps shop owners and their customers save resources.
To do this, the plugin adds a field in the WooCommerce checkout process where customers can give their consent to receive reused shipping packaging. So simple, so effective. And with lots of customization options via filters, let us know if there’s anything else you need.
Current features
[repack]
& [repack_summary]
to show your support and savings.Coming soon
Shortcodes
You can use the following shortcodes and functions to show your savings:
Shortcode [repack]
Display the savings of your site or individual users such as: Amount of reused packages, water saved, CO2 saved and mature trees saved. The shortcode attributes are:
type=""
: What amount to display: “packaging” (default), “co2”, “water” or “trees”value=""
: Set to true
if you only want to display the number/quantity without unit (e.g. “litres of water”)packages=""
: Lets you overwrite the number of packages the output is calculated with. Leave empty to get your sites counter.user_id=""
: User ID of whom you want to display the saving: Leave blank to use the sites total saving instead.prepend=""
: HTML to prepend to output. Default: Empty stringappend=""
: HTML to append to output. Default: Empty stringShortcode [repack_summary]
Displays a summary of you sites savings. You can copy and overwrite the template file from plugins folder /public/templates/summary.php
to your themes folder /repack/summary.php
.
packages=""
: Lets you overwrite the number of packages the output is calculated with. Leave empty to use your sites counter.prepend=""
: HTML to prepend to output. Default: Empty stringappend=""
: HTML to append to output. Default: Empty stringSettings Page
Adjust the plugin to your liking on the settings page: WooCommerce Settings -> Shipping -> WeRePack Settings
. If you miss an option use one of the following filters or let us know.
Available Filters
You can customize the plugin behavior and text by using the following filters in your themes functions.php
or /mu-plugins/wc-repack.php
file:
repack_checkout_consent_position
: Position of the consent, default is woocommerce_after_order_notes
.repack_coupon_name
: Name of the coupon code to apply. Default is WeRePack
.repack_consent_field_label
: Label of the consent checkbox.repack_consent_field_description
: Description of the consent checkbox.repack_consent_field_args
: Arguments of the woocommerce_form_field()
function to add the consent checkbox.repack_consent_field_firework
: Set to false
to deactivate the checkbox animation on consent.repack_coupon_applied_notice_text
: Notice text after coupon was applied.repack_coupon_removed_notice_text
: Notice text after coupon was removed.repack_email_label
: Label in WooCommerce mails if consent was given.repack_email_text
: Text in WooCommerce mails if consent was given.repack_deactivate_remove_all_meta
: Set to true
to delete all plugin related metadata on deactivation.repack_template_summary_data
: $data
object passed to summary.php template.repack_template_summary_saving
: $saving
object passed to summary.php template.Missing something?
Write us what else is needed to make your shop more sustainable. Whatever it is, we will do our best to get as many shops as possible to join the initiative.
Learn more about the initiative on WeRePack.org and join us.