diff --git a/plugins/woocommerce/changelog/remove-first-downloadable-product-note b/plugins/woocommerce/changelog/remove-first-downloadable-product-note new file mode 100644 index 00000000000..dd51ea60e1f --- /dev/null +++ b/plugins/woocommerce/changelog/remove-first-downloadable-product-note @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Remove first downloadable product note diff --git a/plugins/woocommerce/includes/class-wc-install.php b/plugins/woocommerce/includes/class-wc-install.php index 437222d4216..594fb2f7cac 100644 --- a/plugins/woocommerce/includes/class-wc-install.php +++ b/plugins/woocommerce/includes/class-wc-install.php @@ -825,6 +825,7 @@ class WC_Install { 'wc-admin-insight-first-product-and-payment', 'wc-admin-store-notice-setting-moved', 'wc-admin-store-notice-giving-feedback', + 'wc-admin-first-downloadable-product', 'wc-admin-learn-more-about-product-settings', 'wc-admin-adding-and-managing-products', 'wc-admin-onboarding-profiler-reminder', diff --git a/plugins/woocommerce/src/Internal/Admin/Events.php b/plugins/woocommerce/src/Internal/Admin/Events.php index 0d252d75936..94799e91ebd 100644 --- a/plugins/woocommerce/src/Internal/Admin/Events.php +++ b/plugins/woocommerce/src/Internal/Admin/Events.php @@ -17,7 +17,6 @@ use \Automattic\WooCommerce\Internal\Admin\Notes\CustomizeStoreWithBlocks; use \Automattic\WooCommerce\Internal\Admin\Notes\CustomizingProductCatalog; use \Automattic\WooCommerce\Internal\Admin\Notes\EditProductsOnTheMove; use \Automattic\WooCommerce\Internal\Admin\Notes\EUVATNumber; -use \Automattic\WooCommerce\Internal\Admin\Notes\FirstDownloadableProduct; use \Automattic\WooCommerce\Internal\Admin\Notes\FirstProduct; use \Automattic\WooCommerce\Internal\Admin\Notes\InstallJPAndWCSPlugins; use \Automattic\WooCommerce\Internal\Admin\Notes\LaunchChecklist; @@ -76,7 +75,6 @@ class Events { CustomizingProductCatalog::class, EditProductsOnTheMove::class, EUVATNumber::class, - FirstDownloadableProduct::class, FirstProduct::class, LaunchChecklist::class, MagentoMigration::class, diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/FirstDownloadableProduct.php b/plugins/woocommerce/src/Internal/Admin/Notes/FirstDownloadableProduct.php deleted file mode 100644 index e38f22ce385..00000000000 --- a/plugins/woocommerce/src/Internal/Admin/Notes/FirstDownloadableProduct.php +++ /dev/null @@ -1,71 +0,0 @@ - 1, - 'paginate' => true, - 'return' => 'ids', - 'downloadable' => 1, - 'status' => array( 'publish' ), - ) - ); - $products = $query->get_products(); - - // There must be at least 1 downloadable product. - if ( 0 === $products->total ) { - return; - } - - $note = new Note(); - $note->set_title( __( 'Learn more about digital/downloadable products', 'woocommerce' ) ); - $note->set_content( - __( - 'Congrats on adding your first digital product! You can learn more about how to handle digital or downloadable products in our documentation.', - 'woocommerce' - ) - ); - $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); - $note->set_name( self::NOTE_NAME ); - $note->set_content_data( (object) array() ); - $note->set_source( 'woocommerce-admin' ); - $note->add_action( - 'first-downloadable-product-handling', - __( 'Learn more', 'woocommerce' ), - 'https://woocommerce.com/document/digital-downloadable-product-handling/?utm_source=inbox&utm_medium=product' - ); - - return $note; - } -}