Skip to content

Commit

Permalink
Translation for subscription cost text cycle periods
Browse files Browse the repository at this point in the history
  • Loading branch information
kimcoleman committed Sep 17, 2024
1 parent 7cd57bd commit 328924f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/class-pmpro-subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -1010,10 +1010,10 @@ public function get_orders( array $args = [] ) {
public function get_cost_text() {
if ( 1 == $this->cycle_number ) {
// translators: %1$s - price, %2$s - period.
$cost_text = sprintf( __( '%1$s per %2$s', 'paid-memberships-pro' ), pmpro_formatPrice( $this->billing_amount ), $this->cycle_period );
$cost_text = sprintf( __( '%1$s per %2$s', 'paid-memberships-pro' ), pmpro_formatPrice( $this->billing_amount ), pmpro_translate_billing_period( $this->cycle_period, $this->cycle_number ) );
} else {
// translators: %1$s - price, %2$d - number, %3$s - period.
$cost_text = sprintf( __( '%1$s every %2$d %3$s', 'paid-memberships-pro' ), pmpro_formatPrice( $this->billing_amount ), $this->cycle_number, $this->cycle_period );
$cost_text = sprintf( __( '%1$s every %2$d %3$s', 'paid-memberships-pro' ), pmpro_formatPrice( $this->billing_amount ), $this->cycle_number, pmpro_translate_billing_period( $this->cycle_period, $this->cycle_number ) );
}

/**
Expand Down

0 comments on commit 328924f

Please sign in to comment.