'29511', 'slug' => 'patchwork-order-split', 'type' => 'plugin', 'public_key' => 'pk_2dd07ecee1e65e28b08b2d8fee90a', 'is_premium' => false, 'premium_suffix' => 'Pro', 'has_addons' => false, 'has_paid_plans' => true, 'is_org_compliant' => true, 'menu' => [ 'slug' => 'patchwork-split', 'parent' => [ 'slug' => 'patchwork', ], 'account' => false, 'contact' => false, 'support' => false, 'pricing' => false, 'addons' => false, ], 'is_live' => true, ] ); } return $patchwork_split_fs; } patchwork_split_fs(); patchwork_split_fs()->add_action( 'after_uninstall', 'patchwork_split_uninstall' ); do_action( 'patchwork_split_fs_loaded' ); } /** * Runs when the plugin is deleted (Freemius replaces uninstall.php so it can * record the uninstall). Removes settings and the capability. Order meta is kept * on purpose — it's the history of which orders were split from which — and the * shared Patchwork activity table is kept for other Patchwork plugins. */ function patchwork_split_uninstall() { foreach ( [ 'patchwork_split_split_reasons', 'patchwork_split_unable_reasons', 'patchwork_split_parent_when_empty', 'patchwork_split_shipping_mode', 'patchwork_split_restock_unable', 'patchwork_split_email_on_split', 'patchwork_split_email_on_unable', 'patchwork_split_hold_statuses', 'patchwork_split_child_statuses', 'patchwork_split_backorder_mode', 'patchwork_split_auto_backorders_status', 'patchwork_split_version' ] as $option ) { delete_option( $option ); } foreach ( wp_roles()->role_objects as $role ) { $role->remove_cap( 'patchwork_split_manage' ); } } // ─── Patchwork Core (shared dashboard; the newest copy across plugins loads) ─ require_once PATCHWORK_SPLIT_DIR . 'lib/patchwork-core/bootstrap.php'; // ─── Load classes ───────────────────────────────────────────────────────────── require_once PATCHWORK_SPLIT_DIR . 'includes/class-activator.php'; require_once PATCHWORK_SPLIT_DIR . 'includes/class-settings.php'; require_once PATCHWORK_SPLIT_DIR . 'includes/class-email-guard.php'; require_once PATCHWORK_SPLIT_DIR . 'includes/class-splitter.php'; require_once PATCHWORK_SPLIT_DIR . 'includes/class-rest-controller.php'; require_once PATCHWORK_SPLIT_DIR . 'includes/class-admin.php'; require_once PATCHWORK_SPLIT_DIR . 'includes/class-backorders.php'; add_action( 'plugins_loaded', function () { if ( !class_exists( 'WooCommerce' ) ) { add_action( 'admin_notices', function () { echo '
'; echo esc_html__( 'Patchwork Split requires WooCommerce to be installed and active.', 'patchwork-order-split' ); echo '