Product Icon

WooCommerce Deposits

by  Woo
Enable customers to pay for products using a deposit or a payment plan.

Allow Filtering of Deposit Plugin Text

I was surprised to find there is no filter available for the text that is displayed on the front end for deposits. In order to override the text I would need to setup a whole translation file just for this, use the ‘Say What?’ plugin or hack some javascript. A very simple solution would be to add a filter to lines 112 and 114 of /woocommerce-deposits/includes/class-wc-deposits-product-manager.php

You could, for example replace lines 111-114 as such:
$description_raw = ( ‘percent’ === $type ) ? __( ‘Pay a %1$s deposit per %2$s’, ‘woocommerce-deposits’ ) : __( ‘Pay a deposit of %1$s per %2$s’, ‘woocommerce-deposits’ );
return sprintf( apply_filters( ‘woocommerce_deposit_description’, $description_raw, $type ), ” . $amount . ”, $item );

This would be awesome, thanks!

Author

Current Status

Open

Last updated: September 16, 2016

0 comments

Log in to comment on this feature request.