Skip to content

Commit

Permalink
Remove some left overs, subscriptions are not supported in current st…
Browse files Browse the repository at this point in the history
…ate.
  • Loading branch information
remcotolsma committed Oct 5, 2023
1 parent 0359b87 commit a8aef13
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,13 @@ public function __construct() {
*/
public function setup() {
\add_filter( 'pronamic_payment_source_description_' . self::SLUG, [ $this, 'source_description' ], 10, 2 );
\add_filter( 'pronamic_subscription_source_description_' . self::SLUG, [ $this, 'subscription_source_description' ], 10, 2 );

// Check if dependencies are met and integration is active.
if ( ! $this->is_active() ) {
return;
}

\add_filter( 'pronamic_payment_source_text_' . self::SLUG, [ $this, 'source_text' ], 10, 2 );
\add_filter( 'pronamic_subscription_source_text_' . self::SLUG, [ $this, 'subscription_source_text' ], 10, 2 );

// Actions.
\add_action( 'wpcf7_init', [ $this, 'init' ] );
Expand All @@ -86,7 +84,6 @@ public function init() {
\add_action( 'wpcf7_submit', [ $this, 'submit' ], 10, 2 );

// Filters.
\add_filter( 'pronamic_pay_subscription_amount_editable_' . self::SLUG, '__return_true' );
\add_filter( 'wpcf7_collect_mail_tags', [ $this, 'collect_mail_tags' ] );
\add_filter( 'wpcf7_mail_tag_replaced', [ $this, 'replace_mail_tags' ], 10, 4 );
\add_filter( 'wpcf7_submission_result', [ $this, 'submission_result' ], 10, 2 );
Expand Down Expand Up @@ -279,26 +276,4 @@ public function source_text( $text, Payment $payment ) {
public function source_description( $description, Payment $payment ) {
return __( 'Contact Form 7 Entry', 'pronamic_ideal' );
}

/**
* Subscription source text.
*
* @param string $text Source text.
* @param Subscription $subscription Subscription.
* @return string
*/
public function subscription_source_text( $text, Subscription $subscription ) {
return __( 'Contact Form 7', 'pronamic_ideal' );
}

/**
* Subscription source description.
*
* @param string $description Description.
* @param Subscription $subscription Subscription.
* @return string
*/
public function subscription_source_description( $description, Subscription $subscription ) {
return __( 'Contact Form 7 Entry', 'pronamic_ideal' );
}
}

0 comments on commit a8aef13

Please sign in to comment.