← All changes
|
src/Settings/Sections/Integrations/IntegrationSection.php
+15
-1
6.5.0
→
8.0.2
View file →
| @@ -7,13 +7,19 @@ | ||
| 7 | 7 | class IntegrationSection extends SectionAbstract { |
| 8 | 8 | |
| 9 | 9 | use ServiceContainerTrait; |
| 10 | 10 | |
| 11 | + | |
| 11 | 12 | public function getSettings(): array { |
| 12 | 13 | |
| 13 | 14 | $settings = array(); |
| 14 | 15 | |
| 15 | 16 | $categories = array( |
| 17 | + 'u2code' => array( | |
| 18 | + 'title' => __( 'U2Code plugins', 'tier-pricing-table' ), | |
| 19 | + 'description' => __( 'Plugins by the makers of Tiered Pricing Table — built to work together with deep, first-party integrations.', | |
| 20 | + 'tier-pricing-table' ), | |
| 21 | + ), | |
| 16 | 22 | 'other' => array( |
| 17 | 23 | 'title' => __( 'General integrations', 'tier-pricing-table' ), |
| 18 | 24 | 'description' => __( 'Integrations with most popular plugins that are not related to a specific category.' ), |
| 19 | 25 | 'tier-pricing-table', |
| @@ -50,9 +56,12 @@ | ||
| 50 | 56 | $_integrations = apply_filters( 'tiered_pricing_table/settings/integrations_settings', array() ); |
| 51 | 57 | $integrations = []; |
| 52 | 58 | |
| 53 | 59 | foreach ( $_integrations as $integration ) { |
| 54 | - $integrations[ $integration['integration_category'] ][] = $integration; | |
| 60 | + // Official (U2Code) integrations are shown in their own section at the top of the page. | |
| 61 | + $categoryID = ! empty( $integration['official'] ) ? 'u2code' : $integration['integration_category']; | |
| 62 | + | |
| 63 | + $integrations[ $categoryID ][] = $integration; | |
| 55 | 64 | } |
| 56 | 65 | |
| 57 | 66 | foreach ( $categories as $categoryID => $category ) { |
| 58 | 67 | |
| @@ -101,7 +110,12 @@ | ||
| 101 | 110 | delete_option( Settings::SETTINGS_PREFIX . '_integration_woocommerce-deposits' ); |
| 102 | 111 | delete_option( Settings::SETTINGS_PREFIX . '_integration_product-bundles-for-woocommerce' ); |
| 103 | 112 | delete_option( Settings::SETTINGS_PREFIX . '_integration_aelia-multicurrency' ); |
| 104 | 113 | delete_option( Settings::SETTINGS_PREFIX . '_integration_wcpa' ); |
| 114 | + delete_option( Settings::SETTINGS_PREFIX . '_integration_u2code-product-addons' ); | |
| 115 | + delete_option( Settings::SETTINGS_PREFIX . '_integration_u2code-multicurrency' ); | |
| 116 | + delete_option( 'tpt_integrations_badge_seen' ); | |
| 117 | + delete_option( 'tpt_section_badge_seen_multicurrency' ); | |
| 118 | + delete_option( 'tpt_section_badge_seen_product-addons' ); | |
| 105 | 119 | delete_option( Settings::SETTINGS_PREFIX . 'integrations' ); |
| 106 | 120 | } |
| 107 | 121 | } |