Skip to content

Commit

Permalink
Remove the feature flag for the pay-for-order flow (#8699)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsingyuc authored Apr 24, 2024
1 parent 9b6d54c commit ba97c20
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
4 changes: 4 additions & 0 deletions changelog/remove-feature-flag-for-the-pay-for-order-flow
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: update

Remove feature flag for the pay-for-order flow
11 changes: 0 additions & 11 deletions includes/class-wc-payments-features.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class WC_Payments_Features {
const WOOPAY_FIRST_PARTY_AUTH_FLAG_NAME = '_wcpay_feature_woopay_first_party_auth';
const WOOPAY_DIRECT_CHECKOUT_FLAG_NAME = '_wcpay_feature_woopay_direct_checkout';
const AUTH_AND_CAPTURE_FLAG_NAME = '_wcpay_feature_auth_and_capture';
const PAY_FOR_ORDER_FLOW = '_wcpay_feature_pay_for_order_flow';
const DISPUTE_ISSUER_EVIDENCE = '_wcpay_feature_dispute_issuer_evidence';
const STREAMLINE_REFUNDS_FLAG_NAME = '_wcpay_feature_streamline_refunds';
const PAYMENT_OVERVIEW_WIDGET_FLAG_NAME = '_wcpay_feature_payment_overview_widget';
Expand Down Expand Up @@ -351,15 +350,6 @@ public static function should_use_stripe_billing() {
return false;
}

/**
* Checks whether the pay for order flow is enabled
*
* @return bool
*/
public static function is_pay_for_order_flow_enabled() {
return '1' === get_option( self::PAY_FOR_ORDER_FLOW, '0' );
}

/**
* Checks whether Dispute issuer evidence feature should be enabled. Disabled by default.
*
Expand Down Expand Up @@ -392,7 +382,6 @@ public static function to_array() {
'clientSecretEncryption' => self::is_client_secret_encryption_enabled(),
'woopayExpressCheckout' => self::is_woopay_express_checkout_enabled(),
'isAuthAndCaptureEnabled' => self::is_auth_and_capture_enabled(),
'isPayForOrderFlowEnabled' => self::is_pay_for_order_flow_enabled(),
'isDisputeIssuerEvidenceEnabled' => self::is_dispute_issuer_evidence_enabled(),
'isRefundControlsEnabled' => self::is_streamline_refunds_enabled(),
'isPaymentOverviewWidgetEnabled' => self::is_payment_overview_widget_ui_enabled(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function display_express_checkout_buttons() {
* @return bool
*/
private function is_pay_for_order_flow_supported() {
return ( WC_Payments_Features::is_pay_for_order_flow_enabled() && class_exists( '\Automattic\WooCommerce\Blocks\Package' ) && version_compare( \Automattic\WooCommerce\Blocks\Package::get_version(), '11.1.0', '>=' ) );
return ( class_exists( '\Automattic\WooCommerce\Blocks\Package' ) && version_compare( \Automattic\WooCommerce\Blocks\Package::get_version(), '11.1.0', '>=' ) );
}

/**
Expand Down

0 comments on commit ba97c20

Please sign in to comment.