{"id":205116,"date":"2024-10-19T05:17:58","date_gmt":"2024-10-19T05:17:58","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/force-sells-and-smart-bundles-for-woocommerce\/"},"modified":"2026-06-09T19:13:01","modified_gmt":"2026-06-09T19:13:01","slug":"jkm-force-sells","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/jkm-force-sells\/","author":20996235,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2.0","stable_tag":"1.2.0","tested":"7.0","requires":"5.0","requires_php":"5.6","requires_plugins":null,"header_name":"Force Sells and Smart Bundles for WooCommerce","header_author":"Jamsheed KM","header_description":"Automatically add selected products to the cart with a main item, creating smart bundles effortlessly.","assets_banners_color":"825fa4","last_updated":"2026-06-09 19:13:01","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/github.com\/kmjamsheed0\/","header_plugin_uri":"https:\/\/github.com\/kmjamsheed0\/jkm-force-sells","header_author_uri":"https:\/\/github.com\/kmjamsheed0","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1046,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"jamsheedkm","date":"2024-10-19 07:04:53"},"1.1.0":{"tag":"1.1.0","author":"jamsheedkm","date":"2024-11-03 12:41:02"},"1.1.1":{"tag":"1.1.1","author":"jamsheedkm","date":"2025-02-09 10:20:19"},"1.2.0":{"tag":"1.2.0","author":"jamsheedkm","date":"2026-06-09 19:13:01"}},"upgrade_notice":{"1.2.0":"<p>Adds WooCommerce Cart and Checkout Blocks compatibility for modern block-based cart experiences.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3171803,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3171803,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3237389,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3171803,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3566529,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"meta\":{\"title\":\"Force Sells and Smart Bundles Demo\",\"description\":\"A ready-to-test WooCommerce store with a force-sell product, cart, and checkout.\",\"author\":\"kmjamsheed0\",\"categories\":[\"ecommerce\",\"woocommerce\",\"demo\"]},\"landingPage\":\"\\\/force-sells-demo\\\/\",\"preferredVersions\":{\"php\":\"8.3\",\"wp\":\"latest\"},\"features\":{\"networking\":true},\"steps\":[{\"step\":\"login\",\"username\":\"admin\",\"password\":\"password\"},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"woocommerce\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"jkm-force-sells\"},\"options\":{\"activate\":true}},{\"step\":\"installTheme\",\"themeData\":{\"resource\":\"wordpress.org\\\/themes\",\"slug\":\"storefront\"},\"options\":{\"activate\":true}},{\"step\":\"setSiteOptions\",\"options\":{\"blogname\":\"Force Sells Demo Store\",\"blogdescription\":\"Optional and mandatory WooCommerce add-ons in action\",\"woocommerce_store_address\":\"123 Demo Street\",\"woocommerce_store_city\":\"Playground\",\"woocommerce_store_postcode\":\"94103\",\"woocommerce_default_country\":\"US:CA\",\"woocommerce_currency\":\"USD\",\"woocommerce_weight_unit\":\"lbs\",\"woocommerce_dimension_unit\":\"in\",\"woocommerce_allow_tracking\":\"no\"}},{\"step\":\"runPHP\",\"code\":\"<?php\\nrequire_once '\\\/wordpress\\\/wp-load.php';\\nrequire_once ABSPATH . 'wp-admin\\\/includes\\\/plugin.php';\\n\\nforeach ( array( 'woocommerce\\\/woocommerce.php', 'jkm-force-sells\\\/jkm-force-sells.php' ) as $plugin_file ) {\\n\\tif ( file_exists( WP_PLUGIN_DIR . '\\\/' . $plugin_file ) && ! is_plugin_active( $plugin_file ) ) {\\n\\t\\tactivate_plugin( $plugin_file );\\n\\t}\\n}\\n\\nif ( ! class_exists( 'WC_Product_Simple' ) ) {\\n\\t$wc_plugin_file = WP_PLUGIN_DIR . '\\\/woocommerce\\\/woocommerce.php';\\n\\n\\tif ( file_exists( $wc_plugin_file ) ) {\\n\\t\\trequire_once $wc_plugin_file;\\n\\t}\\n}\\n\\nif ( ! class_exists( 'WC_Product_Simple' ) ) {\\n\\techo 'WooCommerce is not active. Skipping Force Sells demo setup.';\\n\\texit( 0 );\\n}\\n\\nif ( class_exists( 'WC_Install' ) ) {\\n\\tWC_Install::create_pages();\\n}\\n\\nupdate_option( 'woocommerce_store_address', '123 Demo Street' );\\nupdate_option( 'woocommerce_store_city', 'Playground' );\\nupdate_option( 'woocommerce_store_postcode', '94103' );\\nupdate_option( 'woocommerce_default_country', 'US:CA' );\\nupdate_option( 'woocommerce_currency', 'USD' );\\nupdate_option( 'woocommerce_weight_unit', 'lbs' );\\nupdate_option( 'woocommerce_dimension_unit', 'in' );\\nupdate_option( 'woocommerce_allow_tracking', 'no' );\\nupdate_option( 'woocommerce_enable_guest_checkout', 'yes' );\\nupdate_option( 'woocommerce_enable_checkout_login_reminder', 'no' );\\nupdate_option( 'woocommerce_enable_signup_and_login_from_checkout', 'no' );\\nupdate_option( 'woocommerce_calc_taxes', 'no' );\\nupdate_option( 'woocommerce_onboarding_profile', array( 'skipped' => true ) );\\nupdate_option( 'woocommerce_cod_settings', array( 'enabled' => 'yes', 'title' => 'Cash on delivery' ) );\\nupdate_option( 'woocommerce_bacs_settings', array( 'enabled' => 'yes', 'title' => 'Direct bank transfer' ) );\\nupdate_option(\\n\\t'jkmfs_settings',\\n\\tarray(\\n\\t\\t'display_position'    => 'woocommerce_before_add_to_cart_button',\\n\\t\\t'display_type'        => 'grid',\\n\\t\\t'show_images'         => 'yes',\\n\\t\\t'show_price'          => 'yes',\\n\\t\\t'custom_message_text' => 'This demo product automatically adds a mandatory synced filter pack and an optional storage tin:',\\n\\t)\\n);\\n\\nfunction jkmfs_blueprint_setup_shipping() {\\n\\tif ( ! class_exists( 'WC_Shipping_Zones' ) || ! class_exists( 'WC_Shipping_Zone' ) ) {\\n\\t\\treturn;\\n\\t}\\n\\n\\t$zone_id = 0;\\n\\t$zones   = WC_Shipping_Zones::get_zones();\\n\\n\\tforeach ( $zones as $zone_data ) {\\n\\t\\tif ( isset( $zone_data['zone_name'] ) && 'United States' === $zone_data['zone_name'] ) {\\n\\t\\t\\t$zone_id = (int) $zone_data['zone_id'];\\n\\t\\t\\tbreak;\\n\\t\\t}\\n\\t}\\n\\n\\t$zone = new WC_Shipping_Zone( $zone_id );\\n\\t$zone->set_zone_name( 'United States' );\\n\\t$zone->set_zone_order( 0 );\\n\\t$zone->save();\\n\\n\\t$has_us_location = false;\\n\\n\\tforeach ( $zone->get_zone_locations() as $location ) {\\n\\t\\tif ( 'country' === $location->type && 'US' === $location->code ) {\\n\\t\\t\\t$has_us_location = true;\\n\\t\\t\\tbreak;\\n\\t\\t}\\n\\t}\\n\\n\\tif ( ! $has_us_location ) {\\n\\t\\t$zone->add_location( 'US', 'country' );\\n\\t}\\n\\n\\t$flat_rate_instance_id = 0;\\n\\n\\tforeach ( $zone->get_shipping_methods( true ) as $shipping_method ) {\\n\\t\\tif ( 'flat_rate' === $shipping_method->id ) {\\n\\t\\t\\t$flat_rate_instance_id = (int) $shipping_method->instance_id;\\n\\t\\t\\tbreak;\\n\\t\\t}\\n\\t}\\n\\n\\tif ( ! $flat_rate_instance_id ) {\\n\\t\\t$flat_rate_instance_id = $zone->add_shipping_method( 'flat_rate' );\\n\\t}\\n\\n\\tupdate_option(\\n\\t\\t'woocommerce_flat_rate_' . $flat_rate_instance_id . '_settings',\\n\\t\\tarray(\\n\\t\\t\\t'title'      => 'Flat rate',\\n\\t\\t\\t'tax_status' => 'none',\\n\\t\\t\\t'cost'       => '5.00',\\n\\t\\t)\\n\\t);\\n}\\n\\nrequire_once ABSPATH . 'wp-admin\\\/includes\\\/media.php';\\nrequire_once ABSPATH . 'wp-admin\\\/includes\\\/file.php';\\nrequire_once ABSPATH . 'wp-admin\\\/includes\\\/image.php';\\n\\nfunction jkmfs_blueprint_attach_product_image( $image_url, $product_id, $filename ) {\\n\\t$tmp = download_url( $image_url );\\n\\n\\tif ( is_wp_error( $tmp ) ) {\\n\\t\\treturn false;\\n\\t}\\n\\n\\t$file_array = array(\\n\\t\\t'name'     => $filename,\\n\\t\\t'tmp_name' => $tmp,\\n\\t);\\n\\n\\t$attachment_id = media_handle_sideload( $file_array, $product_id );\\n\\n\\t@unlink( $tmp );\\n\\n\\tif ( is_wp_error( $attachment_id ) ) {\\n\\t\\treturn false;\\n\\t}\\n\\n\\tset_post_thumbnail( $product_id, $attachment_id );\\n\\n\\t$product = wc_get_product( $product_id );\\n\\n\\tif ( $product ) {\\n\\t\\t$product->set_image_id( $attachment_id );\\n\\t\\t$product->save();\\n\\t}\\n\\n\\treturn $attachment_id;\\n}\\n\\nfunction jkmfs_blueprint_create_product( $product_data ) {\\n\\t$product_id = wc_get_product_id_by_sku( $product_data['sku'] );\\n\\n\\tif ( ! $product_id && ! empty( $product_data['id'] ) && ! get_post( $product_data['id'] ) ) {\\n\\t\\t$product_id = wp_insert_post(\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'import_id'    => (int) $product_data['id'],\\n\\t\\t\\t\\t'post_title'   => $product_data['name'],\\n\\t\\t\\t\\t'post_name'    => $product_data['slug'],\\n\\t\\t\\t\\t'post_status'  => 'publish',\\n\\t\\t\\t\\t'post_type'    => 'product',\\n\\t\\t\\t\\t'post_content' => $product_data['description'],\\n\\t\\t\\t\\t'post_excerpt' => $product_data['short_description'],\\n\\t\\t\\t),\\n\\t\\t\\ttrue\\n\\t\\t);\\n\\n\\t\\tif ( is_wp_error( $product_id ) ) {\\n\\t\\t\\t$product_id = 0;\\n\\t\\t}\\n\\t}\\n\\n\\t$product = $product_id ? new WC_Product_Simple( $product_id ) : new WC_Product_Simple();\\n\\n\\t$product->set_name( $product_data['name'] );\\n\\t$product->set_slug( $product_data['slug'] );\\n\\t$product->set_sku( $product_data['sku'] );\\n\\t$product->set_status( 'publish' );\\n\\t$product->set_catalog_visibility( 'visible' );\\n\\t$product->set_regular_price( $product_data['regular_price'] );\\n\\t$product->set_price( $product_data['regular_price'] );\\n\\t$product->set_description( $product_data['description'] );\\n\\t$product->set_short_description( $product_data['short_description'] );\\n\\t$product->set_manage_stock( false );\\n\\t$product->set_stock_status( 'instock' );\\n\\t$product->set_virtual( true );\\n\\t$product->set_sold_individually( false );\\n\\n\\t$product_id = $product->save();\\n\\n\\tif ( ! empty( $product_data['image_url'] ) ) {\\n\\t\\tjkmfs_blueprint_attach_product_image( $product_data['image_url'], $product_id, $product_data['image_name'] );\\n\\t}\\n\\n\\treturn $product_id;\\n}\\n\\njkmfs_blueprint_setup_shipping();\\n\\n$main_product_id = jkmfs_blueprint_create_product(\\n\\tarray(\\n\\t\\t'id'                => 1001,\\n\\t\\t'name'              => 'Coffee Starter Kit',\\n\\t\\t'slug'              => 'coffee-starter-kit',\\n\\t\\t'sku'               => 'jkmfs-coffee-kit',\\n\\t\\t'regular_price'     => '49.00',\\n\\t\\t'short_description' => 'Add this product to the cart to see optional and mandatory force-sell products added automatically.',\\n\\t\\t'description'       => 'This product is configured for the Force Sells and Smart Bundles demo. It has one mandatory synced add-on and one optional add-on so you can test both workflows from the product page, cart, and checkout.',\\n\\t\\t'image_url'         => 'https:\\\/\\\/placehold.co\\\/900x900\\\/4f3422\\\/f8efe5.png?text=Coffee+Starter+Kit',\\n\\t\\t'image_name'        => 'coffee-starter-kit.png',\\n\\t)\\n);\\n\\n$mandatory_product_id = jkmfs_blueprint_create_product(\\n\\tarray(\\n\\t\\t'id'                => 1002,\\n\\t\\t'name'              => 'Reusable Coffee Filter Pack',\\n\\t\\t'slug'              => 'reusable-coffee-filter-pack',\\n\\t\\t'sku'               => 'jkmfs-filter-pack',\\n\\t\\t'regular_price'     => '8.00',\\n\\t\\t'short_description' => 'Mandatory force-sell item synced to the main product quantity.',\\n\\t\\t'description'       => 'This mandatory add-on is forcefully added with the Coffee Starter Kit. Its quantity stays synced with the parent item.',\\n\\t\\t'image_url'         => 'https:\\\/\\\/placehold.co\\\/900x900\\\/2f6f53\\\/e9fff1.png?text=Reusable+Filter+Pack',\\n\\t\\t'image_name'        => 'reusable-coffee-filter-pack.png',\\n\\t)\\n);\\n\\n$optional_product_id = jkmfs_blueprint_create_product(\\n\\tarray(\\n\\t\\t'id'                => 1003,\\n\\t\\t'name'              => 'Coffee Storage Tin',\\n\\t\\t'slug'              => 'coffee-storage-tin',\\n\\t\\t'sku'               => 'jkmfs-storage-tin',\\n\\t\\t'regular_price'     => '14.00',\\n\\t\\t'short_description' => 'Optional force-sell item that can be removed independently.',\\n\\t\\t'description'       => 'This optional add-on is added with the Coffee Starter Kit but can be removed from the cart without removing the parent product.',\\n\\t\\t'image_url'         => 'https:\\\/\\\/placehold.co\\\/900x900\\\/315a74\\\/eaf6ff.png?text=Coffee+Storage+Tin',\\n\\t\\t'image_name'        => 'coffee-storage-tin.png',\\n\\t)\\n);\\n\\n$main_product = wc_get_product( $main_product_id );\\n\\nif ( $main_product ) {\\n\\t$main_product->update_meta_data( 'jkm_meta_force_sell_ids', array( $optional_product_id ) );\\n\\t$main_product->update_meta_data( 'jkm_meta_force_sell_synced_ids', array( $mandatory_product_id ) );\\n\\t$main_product->save();\\n}\\n\\nfunction jkmfs_blueprint_upsert_page( $slug, $title, $content ) {\\n\\t$page = get_page_by_path( $slug );\\n\\n\\tif ( $page ) {\\n\\t\\twp_update_post(\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'ID'           => $page->ID,\\n\\t\\t\\t\\t'post_title'   => $title,\\n\\t\\t\\t\\t'post_content' => $content,\\n\\t\\t\\t)\\n\\t\\t);\\n\\n\\t\\treturn $page->ID;\\n\\t}\\n\\n\\treturn wp_insert_post(\\n\\t\\tarray(\\n\\t\\t\\t'post_title'   => $title,\\n\\t\\t\\t'post_name'    => $slug,\\n\\t\\t\\t'post_status'  => 'publish',\\n\\t\\t\\t'post_type'    => 'page',\\n\\t\\t\\t'post_content' => $content,\\n\\t\\t)\\n\\t);\\n}\\n\\n$cart_page_id     = jkmfs_blueprint_upsert_page( 'cart', 'Cart', '[woocommerce_cart]' );\\n$checkout_page_id = jkmfs_blueprint_upsert_page( 'checkout', 'Checkout', '[woocommerce_checkout]' );\\n$shop_page_id     = jkmfs_blueprint_upsert_page( 'shop', 'Shop', '<!-- wp:shortcode -->[products limit=\\\"12\\\" columns=\\\"3\\\"]<!-- \\\/wp:shortcode -->' );\\n\\n$add_to_cart_url = add_query_arg( 'add-to-cart', $main_product_id, home_url( '\\\/cart\\\/' ) );\\n$product_url     = get_permalink( $main_product_id );\\n$settings_url    = admin_url( 'edit.php?post_type=product&page=jkmfs_force_sell_settings' );\\n\\n$demo_page_content = '<!-- wp:heading --><h2>Force Sells demo<\\\/h2><!-- \\\/wp:heading -->'\\n\\t. '<!-- wp:paragraph --><p>Use the Coffee Starter Kit to test optional and mandatory force-sell products in WooCommerce.<\\\/p><!-- \\\/wp:paragraph -->'\\n\\t. '<!-- wp:list --><ul><li>Automatically adds the selected add-on products when the bundle product is added to the cart.<\\\/li><li>Keeps the mandatory filter pack synced with the parent product quantity.<\\\/li><li>Allows the optional storage tin to be removed independently from the cart.<\\\/li><li>Shows add-on products with images, prices, and a custom product-page message.<\\\/li><li>Works with the standard cart and checkout flow in this Playground demo.<\\\/li><\\\/ul><!-- \\\/wp:list -->'\\n\\t. '<!-- wp:buttons --><div class=\\\"wp-block-buttons\\\">'\\n\\t. '<!-- wp:button --><div class=\\\"wp-block-button\\\"><a class=\\\"wp-block-button__link wp-element-button\\\" href=\\\"' . esc_url( $product_url ) . '\\\">View bundle product<\\\/a><\\\/div><!-- \\\/wp:button -->'\\n\\t. '<!-- wp:button --><div class=\\\"wp-block-button\\\"><a class=\\\"wp-block-button__link wp-element-button\\\" href=\\\"' . esc_url( $add_to_cart_url ) . '\\\">Add to cart<\\\/a><\\\/div><!-- \\\/wp:button -->'\\n\\t. '<!-- wp:button --><div class=\\\"wp-block-button\\\"><a class=\\\"wp-block-button__link wp-element-button\\\" href=\\\"' . esc_url( $settings_url ) . '\\\">Plugin settings<\\\/a><\\\/div><!-- \\\/wp:button -->'\\n\\t. '<\\\/div><!-- \\\/wp:buttons -->';\\n\\njkmfs_blueprint_upsert_page( 'force-sells-demo', 'Force Sells Demo', $demo_page_content );\\n\\nupdate_option( 'woocommerce_cart_page_id', $cart_page_id );\\nupdate_option( 'woocommerce_checkout_page_id', $checkout_page_id );\\nupdate_option( 'woocommerce_shop_page_id', $shop_page_id );\\nupdate_option( 'permalink_structure', '\\\/%postname%\\\/' );\\nflush_rewrite_rules();\\n\\necho 'Force Sells demo store ready. Main product ID: ' . absint( $main_product_id );\"}]}"}},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0","1.1.1","1.2.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3171803,"resolution":"1","location":"assets","locale":"","width":3419,"height":1040},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3180680,"resolution":"2","location":"assets","locale":"","width":3419,"height":1831},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3180680,"resolution":"3","location":"assets","locale":"","width":3420,"height":1637}},"screenshots":{"1":"Add force sell products.","2":"List View.","3":"Grid View."}},"plugin_section":[],"plugin_tags":[233376,225237,65790,233377,233375],"plugin_category":[],"plugin_contributors":[233378],"plugin_business_model":[],"class_list":["post-205116","plugin","type-plugin","status-publish","hentry","plugin_tags-automatic-add-to-cart","plugin_tags-force-sells","plugin_tags-product-add-ons","plugin_tags-product-grouping","plugin_tags-smart-bundles","plugin_contributors-jamsheedkm","plugin_committers-jamsheedkm"],"banners":{"banner":"https:\/\/ps.w.org\/jkm-force-sells\/assets\/banner-772x250.png?rev=3171803","banner_2x":"https:\/\/ps.w.org\/jkm-force-sells\/assets\/banner-1544x500.png?rev=3237389","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/jkm-force-sells\/assets\/icon-128x128.png?rev=3171803","icon_2x":"https:\/\/ps.w.org\/jkm-force-sells\/assets\/icon-256x256.png?rev=3171803","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/jkm-force-sells\/assets\/screenshot-1.png?rev=3171803","caption":"Add force sell products."},{"src":"https:\/\/ps.w.org\/jkm-force-sells\/assets\/screenshot-2.png?rev=3180680","caption":"List View."},{"src":"https:\/\/ps.w.org\/jkm-force-sells\/assets\/screenshot-3.png?rev=3180680","caption":"Grid View."}],"raw_content":"<!--section=description-->\n<p><strong>Force Sells and Smart Bundles for WooCommerce<\/strong> allows you to add optional or mandatory add-on products to the cart whenever a main item is added.<\/p>\n\n<p><strong>New:<\/strong> Compatible with WooCommerce Cart and Checkout Blocks, so force-sell items continue to work with modern block-based cart experiences.<\/p>\n\n<ul>\n<li>Automatically link and sell additional products with ease.<\/li>\n<li>When a main item is added to the cart, its associated linked products are also added.<\/li>\n<li>Mandatory products are synchronized with the main item\u2019s quantity. Optional products can be removed from the cart without affecting the main item.<\/li>\n<li>The quantity of mandatory items is always synced with the main item (e.g., if one main item is added, one mandatory item will also be in the cart).<\/li>\n<li>Flexible display settings enable you to choose where the force-sell products should appear (before or after the \"Add to Cart\" button).<\/li>\n<li>Customize the layout of force-sell items as list view or grid view, and choose whether to show product images.<\/li>\n<li>Works with WooCommerce Cart and Checkout Blocks.<\/li>\n<\/ul>\n\n<p>The plugin is highly developer-friendly, allowing you to easily add more functionalities with our hooks.<\/p>\n\n<h4>Key Features<\/h4>\n\n<p><strong>1. Display Styles:<\/strong>\n- Choose to display force-sell items in a list or grid view.\n- Option to show or hide force-sell product images.\n- Option to show or hide force-sell product prices.\n- Add custom message on the product page.<\/p>\n\n<p><strong>2. Additional Display Positions:<\/strong>\n- Display force-sell products before or after the \"Add to Cart\" button.<\/p>\n\n<p><strong>3. Advanced Display Rules:<\/strong>\n- Add mandatory or optional add-on products to a main product.\n- Sync the quantity of mandatory products with the main item.\n- Allow optional products to be removed from the cart without affecting the main item.\n- Support WooCommerce Cart and Checkout Blocks for block-based cart pages.<\/p>\n\n<p><strong>4. Developer-Friendly:<\/strong>\n- Add more functionalities with our hooks, making it easy for developers to extend the plugin.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/jkm-force-sells<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress.<\/li>\n<li>Configure the settings under Products -&gt; Force Sell Settings.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20configure%20the%20display%20settings%3F\"><h3>How do I configure the display settings?<\/h3><\/dt>\n<dd><p>You can configure the display settings by navigating to Products -&gt; Force Sell Settings. Here, you can choose the display style, position, and image options.<\/p><\/dd>\n<dt id=\"how%20do%20i%20add%20optional%20and%20mandatory%20add-ons%20to%20a%20product%3F\"><h3>How do I add optional and mandatory add-ons to a product?<\/h3><\/dt>\n<dd><p>To add optional and mandatory add-ons, go to the WooCommerce single product edit page. Under the Linked Products section, you'll find two additional fields for managing optional and mandatory add-ons, respectively.<\/p><\/dd>\n<dt id=\"what%20happens%20when%20i%20add%20mandatory%20add-ons%20to%20a%20product%3F\"><h3>What happens when I add mandatory add-ons to a product?<\/h3><\/dt>\n<dd><p>Mandatory add-ons will always sync with the main product\u2019s quantity, ensuring they are added to the cart whenever the main product is purchased.<\/p><\/dd>\n<dt id=\"can%20i%20add%20both%20optional%20and%20mandatory%20add-ons%20to%20a%20product%3F\"><h3>Can I add both optional and mandatory add-ons to a product?<\/h3><\/dt>\n<dd><p>Yes, the plugin allows you to add both optional and mandatory add-ons to a main product. Mandatory add-ons will always sync with the main product\u2019s quantity.<\/p><\/dd>\n<dt id=\"does%20this%20plugin%20support%20woocommerce%20cart%20blocks%3F\"><h3>Does this plugin support WooCommerce Cart Blocks?<\/h3><\/dt>\n<dd><p>Yes. Force-sell products are compatible with WooCommerce Cart and Checkout Blocks. Mandatory add-ons stay synced with the main product quantity in block-based cart pages.<\/p><\/dd>\n<dt id=\"is%20this%20plugin%20developer-friendly%3F\"><h3>Is this plugin developer-friendly?<\/h3><\/dt>\n<dd><p>Yes, the plugin is highly developer-friendly, providing hooks and filters to extend its functionality. Below is a list of some basic filters available for customization:<\/p>\n\n<ul>\n<li><code>jkmfs_products_display_hook_name<\/code>: Customize the hook name for displaying force sell products.<\/li>\n<li><code>jkmfs_products_display_hook_priority<\/code>: Customize the priority of the display hook.<\/li>\n<li><code>jkmfs_products_display_type<\/code>: Control the display type (e.g., list, grid) for force sell products.<\/li>\n<li><code>jkmfs_show_products_images<\/code>: Enable or disable the display of product images for force sell products.<\/li>\n<li><code>jkmfs_show_products_prices<\/code>: Enable or disable the display of product prices for force sell products.<\/li>\n<li><code>jkmfs_force_sell_add_to_cart_product<\/code>: Customize parameters for adding a force sell product to the cart.<\/li>\n<li><code>jkmfs_force_sell_disallow_no_stock<\/code>: Control whether out-of-stock products are disallowed for force sell.<\/li>\n<li><code>jkmfs_force_sell_update_quantity<\/code>: Customize the quantity of force sell products in the cart.<\/li>\n<li><code>jkmfs_modify_custom_message<\/code>: Modify the custom message on product page.<\/li>\n<\/ul><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Added: Support for WooCommerce Cart and Checkout Blocks.<\/li>\n<li>Added: WordPress Playground live preview configuration.<\/li>\n<li>Added: Compatibility with WooCommerce 10.8.<\/li>\n<li>Added: Compatibility with WordPress 7.0.<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Added: New feature to add a custom message on the product page.<\/li>\n<li>Added: Compatibility with WooCommerce 9.7.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Added: New feature to display product price of force-selling products.<\/li>\n<li>Added: Compatibility with WooCommerce 9.4.<\/li>\n<li>Added: Compatibility with WordPress 6.7.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<li>Force-sell functionality to automatically add products to the cart.<\/li>\n<li>Display customization options for force-sell products.<\/li>\n<li>Developer hooks for extended customization and integration.<\/li>\n<\/ul>","raw_excerpt":"Add optional or mandatory add-ons to the cart with main items. Create smart bundles that automatically link and sell additional products effortlessly.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/205116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=205116"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jamsheedkm"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=205116"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=205116"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=205116"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=205116"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=205116"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=205116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}