array( 'name' => 'WooCommerce', 'category' => 'Commerce', 'description' => 'Customers, orders, payments and abandoned carts from WooCommerce, with recovery emails.', 'requires_name' => 'WooCommerce', 'requires_file' => 'woocommerce/woocommerce.php', 'plugin_file' => 'acquisitionsuite-woocommerce/acquisitionsuite-woocommerce.php', 'docs_url' => $docs . 'woocommerce-add-on/' ), 'edd' => array( 'name' => 'Easy Digital Downloads', 'category' => 'Commerce', 'description' => 'Customers and purchases from Easy Digital Downloads, including refunds and abandoned orders.', 'requires_name' => 'Easy Digital Downloads', 'requires_file' => 'easy-digital-downloads/easy-digital-downloads.php', 'plugin_file' => 'acquisitionsuite-edd/acquisitionsuite-edd.php', 'docs_url' => $docs . 'easy-digital-downloads-add-on/' ), 'onepagesale' => array( 'name' => 'OnePage Sale', 'category' => 'Commerce', 'description' => 'Orders, payments, deliveries and reviews from OnePage Sale Engine, including Pay on Delivery.', 'requires_name' => 'OnePage Sale Engine', 'requires_file' => 'onepage-sale-engine/onepage-sale-engine.php', 'plugin_file' => 'acquisitionsuite-onepagesale/acquisitionsuite-onepagesale.php', 'docs_url' => $docs . 'onepage-sale-add-on/' ), 'wpforms' => array( 'name' => 'WPForms', 'category' => 'Forms', 'description' => 'Everyone who fills in a WPForms form becomes a lead.', 'requires_name' => 'WPForms', 'requires_file' => 'wpforms-lite/wpforms.php', 'plugin_file' => 'acquisitionsuite-wpforms/acquisitionsuite-wpforms.php', 'docs_url' => $docs . 'form-plugin-add-ons/' ), 'fluentform' => array( 'name' => 'Fluent Forms', 'category' => 'Forms', 'description' => 'Everyone who fills in a Fluent Forms form becomes a lead.', 'requires_name' => 'Fluent Forms', 'requires_file' => 'fluentform/fluentform.php', 'plugin_file' => 'acquisitionsuite-fluentform/acquisitionsuite-fluentform.php', 'docs_url' => $docs . 'form-plugin-add-ons/' ), 'formidable' => array( 'name' => 'Formidable', 'category' => 'Forms', 'description' => 'Everyone who fills in a Formidable form becomes a lead.', 'requires_name' => 'Formidable Forms', 'requires_file' => 'formidable/formidable.php', 'plugin_file' => 'acquisitionsuite-formidable/acquisitionsuite-formidable.php', 'docs_url' => $docs . 'form-plugin-add-ons/' ), 'cf7' => array( 'name' => 'Contact Form 7', 'category' => 'Forms', 'description' => 'Everyone who fills in a Contact Form 7 form becomes a lead.', 'requires_name' => 'Contact Form 7', 'requires_file' => 'contact-form-7/wp-contact-form-7.php', 'plugin_file' => 'acquisitionsuite-cf7/acquisitionsuite-cf7.php', 'docs_url' => $docs . 'form-plugin-add-ons/' ), 'whatsapp' => array( 'name' => 'WhatsApp', 'category' => 'Messaging', 'description' => 'Message your leads on WhatsApp from automation rules with approved templates, and hear back when they reply.', 'requires_name' => '', 'requires_file' => '', 'plugin_file' => 'acquisitionsuite-whatsapp/acquisitionsuite-whatsapp.php', 'docs_url' => $docs . 'whatsapp-add-on/' ), 'sms' => array( 'name' => 'SMS', 'category' => 'Messaging', 'description' => 'Text your leads from automation rules with Twilio, Termii, Africa\'s Talking or Vonage, with STOP handling and quiet hours.', 'requires_name' => '', 'requires_file' => '', 'plugin_file' => 'acquisitionsuite-sms/acquisitionsuite-sms.php', 'docs_url' => $docs . 'sms-add-on/' ), ); } /** What the page shows. A site or another plugin can adjust it with the filter. */ public static function catalog() { return (array) apply_filters( 'acquis_addons_page_catalog', self::bundled() ); } // ── Page ─────────────────────────────────────────────────────────────── public static function render() { if ( ! current_user_can( 'manage_options' ) ) { wp_die( esc_html__( 'Insufficient permissions.', 'acquisitionsuite' ), 403 ); } // Pro draws the whole page for a licensed site. $renderer = apply_filters( 'acquis_addons_page_renderer', null ); if ( 'pro' === self::state() && is_callable( $renderer ) ) { call_user_func( $renderer ); return; } self::render_directory( self::state() ); } private static function category_icon( $category ) { $map = array( 'commerce' => 'dashicons-cart', 'forms' => 'dashicons-feedback', 'messaging' => 'dashicons-format-chat' ); return $map[ strtolower( (string) $category ) ] ?? 'dashicons-admin-plugins'; } private static function plugin_active( $file ) { return '' !== $file && is_plugin_active( $file ); } private static function card( $slug, array $a, $state, $detected ) { $installed = isset( get_plugins()[ $a['plugin_file'] ] ); $has_req = '' !== $a['requires_name']; $req_on = $has_req && self::plugin_active( $a['requires_file'] ); ?>

$installed, 'title' => __( 'Get AcquisitionSuite Pro', 'acquisitionsuite' ), 'text' => __( 'Choose a plan and download the plugin from your account.', 'acquisitionsuite' ), 'link' => array( self::PRICING_URL, __( 'See plans and pricing', 'acquisitionsuite' ), true ), ), array( 'done' => $active, 'title' => __( 'Upload and activate it', 'acquisitionsuite' ), 'text' => __( 'Plugins → Add New → Upload Plugin, then Activate. It works alongside this plugin.', 'acquisitionsuite' ), 'link' => $installed ? array( admin_url( 'plugins.php' ), __( 'Go to Plugins', 'acquisitionsuite' ), false ) : array( admin_url( 'plugin-install.php?tab=upload' ), __( 'Upload a plugin', 'acquisitionsuite' ), false ), ), array( 'done' => false, 'title' => __( 'Enter your license key', 'acquisitionsuite' ), 'text' => __( 'Then the add-ons on this page can be installed with one click.', 'acquisitionsuite' ), 'link' => $active ? array( admin_url( 'admin.php?page=acquis-license' ), __( 'Enter your license key', 'acquisitionsuite' ), false ) : null, ), ); $current = null; foreach ( $steps as $i => $s ) { if ( ! $s['done'] ) { $current = $i; break; } } return array( $steps, $current ); } private static function render_directory( $state ) { $catalog = self::catalog(); $detected = array(); $groups = array(); foreach ( $catalog as $slug => $a ) { $a = array_merge( array( 'name' => $slug, 'category' => '', 'description' => '', 'requires_name' => '', 'requires_file' => '', 'plugin_file' => '', 'docs_url' => '' ), (array) $a ); if ( '' !== $a['requires_file'] && self::plugin_active( $a['requires_file'] ) ) { $detected[ $slug ] = $a; } else { $groups[ $a['category'] ? $a['category'] : __( 'Other', 'acquisitionsuite' ) ][ $slug ] = $a; } } ksort( $groups ); list( $steps, $current ) = self::steps( $state ); $pill = 'no_license' === $state ? __( 'Pro is active, license needed', 'acquisitionsuite' ) : __( 'Pro is not installed', 'acquisitionsuite' ); ?>
v

    $s ) : ?>
  1. >

$a ) { self::card( $slug, $a, $state, true ); } ?>
$items ) : ?>

$a ) { self::card( $slug, $a, $state, false ); } ?>