1. Home
  2. Knowledge Base
  3. WooCommerce Deposits and Part Payments
  4. Advanced Topics for Deposits and Part Payments
  5. Changing text strings in Deposits and Part Payments
  1. Home
  2. Knowledge Base
  3. WooCommerce Deposits and Part Payments
  4. Changing text strings in Deposits and Part Payments

Changing text strings in Deposits and Part Payments

If you’d like to change the text strings for ‘Payment options’, ‘Pay deposit’ and ‘Pay in full’, you can use the following snippet:

<?php
/**
* Change the 'Payment Options' text string
*/
function prefix_deposit_field_heading( $label ) {
return 'My new heading';
}
add_filter( 'wcdpp_deposit_field_heading', 'prefix_deposit_field_heading' );
function prefix_deposit_amount_label( $label, $deposit, $product ) {
return sprintf(
__( 'My new label (%s)', 'wcdpp' ),
$deposit
);
}
add_filter( 'wcdpp_deposit_amount_label', 'prefix_deposit_amount_label', 10, 3 );
function prefix_pay_in_full_label_front_end( $label ) {
return 'My new label';
}
add_filter( 'wcdpp_pay_in_full_label_front_end', 'prefix_pay_in_full_label_front_end' );

Here’s how to add the snippet.

Was this article helpful?

Related Articles