✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server366.web-hosting.com ​🇻​♯➤ 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 67.223.118.204 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.243
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/builxejc/public_html/wp-content/plugins/woocommerce/src/Internal//AssignDefaultCategory.php
<?php
/**
 * AssignDefaultCategory class file.
 */

namespace Automattic\WooCommerce\Internal;

defined( 'ABSPATH' ) || exit;

/**
 * Class to assign default category to products.
 */
class AssignDefaultCategory {
	/**
	 * Class initialization, to be executed when the class is resolved by the container.
	 *
	 * @internal
	 */
	final public function init() {
		add_action( 'wc_schedule_update_product_default_cat', array( $this, 'maybe_assign_default_product_cat' ) );
	}

	/**
	 * When a product category is deleted, we need to check
	 * if the product has no categories assigned. Then assign
	 * it a default category. We delay this with a scheduled
	 * action job to not block the response.
	 *
	 * @return void
	 */
	public function schedule_action() {
		WC()->queue()->schedule_single(
			time(),
			'wc_schedule_update_product_default_cat',
			array(),
			'wc_update_product_default_cat'
		);
	}

	/**
	 * Assigns default product category for products
	 * that have no categories.
	 *
	 * @return void
	 */
	public function maybe_assign_default_product_cat() {
		global $wpdb;

		$default_category = get_option( 'default_product_cat', 0 );

		if ( $default_category ) {
			$affected_rows = $wpdb->query(
				$wpdb->prepare(
					"INSERT INTO {$wpdb->term_relationships} (object_id, term_taxonomy_id)
					SELECT DISTINCT posts.ID, %s FROM {$wpdb->posts} posts
					LEFT JOIN
						(
							SELECT object_id FROM {$wpdb->term_relationships} term_relationships
							LEFT JOIN {$wpdb->term_taxonomy} term_taxonomy ON term_relationships.term_taxonomy_id = term_taxonomy.term_taxonomy_id
							WHERE term_taxonomy.taxonomy = 'product_cat'
						) AS tax_query
					ON posts.ID = tax_query.object_id
					WHERE posts.post_type = 'product'
					AND tax_query.object_id IS NULL",
					$default_category
				)
			);
			if ( $affected_rows > 0 ) {
				wp_cache_flush();
				delete_transient( 'wc_term_counts' );
				wp_update_term_count_now( array( $default_category ), 'product_cat' );
			}
		}
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Abilities
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
AbilitiesApi
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
AddressProvider
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Admin
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Agentic
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Api
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
BatchProcessing
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
CLI
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Caches
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
ComingSoon
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
CostOfGoodsSold
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Customers
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
DataStores
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
DependencyManagement
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Email
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
EmailEditor
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Features
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Integrations
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Jetpack
--
17 Jun 2026 11.47 AM
builxejc / builxejc
0755
Logging
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
MCP
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
OrderReviews
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Orders
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
ProductAttributesLookup
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
ProductDownloads
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
ProductFeed
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
ProductFilters
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
ProductImage
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
PushNotifications
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
ReceiptRendering
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
RestApi
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Settings
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
StockNotifications
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Traits
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
TransientFiles
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
Utilities
--
17 Jun 2026 9.03 AM
builxejc / builxejc
0755
WCCom
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
AssignDefaultCategory.php
1.954 KB
27 Aug 2024 11.04 PM
builxejc / builxejc
0644
Brands.php
1.27 KB
29 Jul 2025 12.34 PM
builxejc / builxejc
0644
DownloadPermissionsAdjuster.php
6.6 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
McStats.php
2.099 KB
23 Sep 2024 8.44 PM
builxejc / builxejc
0644
OrderCouponDataMigrator.php
8.328 KB
18 Dec 2024 10.19 PM
builxejc / builxejc
0644
RegisterHooksInterface.php
0.492 KB
28 Nov 2024 3.41 AM
builxejc / builxejc
0644
RestApiControllerBase.php
8.015 KB
23 Jun 2025 7.46 PM
builxejc / builxejc
0644
RestApiParameterUtil.php
5.717 KB
28 May 2024 2.28 PM
builxejc / builxejc
0644
RestockRefundedItemsAdjuster.php
2.139 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF