✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

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

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

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/tdhomesa/tdtravelandlogistics.com/wp-content/plugins/woocommerce/src/Blocks//Installer.php
<?php
namespace Automattic\WooCommerce\Blocks;

/**
 * Installer class.
 * Handles installation of Blocks plugin dependencies.
 *
 * @internal
 */
class Installer {
	/**
	 * Initialize class features.
	 */
	public function init() {
		add_action( 'admin_init', array( $this, 'install' ) );
		add_filter( 'woocommerce_create_pages', array( $this, 'create_pages' ) );
	}

	/**
	 * Installation tasks ran on admin_init callback.
	 */
	public function install() {
		$this->maybe_create_tables();
	}

	/**
	 * Modifies default page content replacing it with classic shortcode block.
	 * We check for shortcode as default because after WooCommerce 8.3, block-based checkout is used by default.
	 * This only runs on Tools > Create Pages as the filter is not applied on WooCommerce plugin activation.
	 *
	 * @param array $pages Default pages.
	 * @return array
	 */
	public function create_pages( $pages ) {

		if ( '<!-- wp:shortcode -->[woocommerce_cart]<!-- /wp:shortcode -->' === ( $pages['cart']['content'] ?? null ) ) {
			$pages['cart']['content'] = '<!-- wp:woocommerce/classic-shortcode {"shortcode":"cart"} /-->';
		}

		if ( '<!-- wp:shortcode -->[woocommerce_checkout]<!-- /wp:shortcode -->' === ( $pages['checkout']['content'] ?? null ) ) {
			$pages['checkout']['content'] = '<!-- wp:woocommerce/classic-shortcode {"shortcode":"checkout"} /-->';
		}

		return $pages;
	}

	/**
	 * Set up the database tables which the plugin needs to function.
	 */
	public function maybe_create_tables() {
		global $wpdb;

		$schema_version    = 260;
		$db_schema_version = (int) get_option( 'wc_blocks_db_schema_version', 0 );

		if ( $db_schema_version >= $schema_version && 0 !== $db_schema_version ) {
			return;
		}

		$show_errors = $wpdb->hide_errors();
		$table_name  = $wpdb->prefix . 'wc_reserved_stock';
		$collate     = $wpdb->has_cap( 'collation' ) ? $wpdb->get_charset_collate() : '';
		$exists      = $this->maybe_create_table(
			$wpdb->prefix . 'wc_reserved_stock',
			"
			CREATE TABLE {$wpdb->prefix}wc_reserved_stock (
				`order_id` bigint(20) NOT NULL,
				`product_id` bigint(20) NOT NULL,
				`stock_quantity` double NOT NULL DEFAULT 0,
				`timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
				`expires` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
				PRIMARY KEY  (`order_id`, `product_id`),
				KEY product_id_expires (product_id, expires)
			) $collate;
			"
		);

		if ( $show_errors ) {
			$wpdb->show_errors();
		}

		if ( ! $exists ) {
			return $this->add_create_table_notice( $table_name );
		}

		// Update succeeded. This is only updated when successful and validated.
		// $schema_version should be incremented when changes to schema are made within this method.
		update_option( 'wc_blocks_db_schema_version', $schema_version );
	}

	/**
	 * Create database table, if it doesn't already exist.
	 *
	 * Based on admin/install-helper.php maybe_create_table function.
	 *
	 * @param string $table_name Database table name.
	 * @param string $create_sql Create database table SQL.
	 * @return bool False on error, true if already exists or success.
	 */
	protected function maybe_create_table( $table_name, $create_sql ) {
		global $wpdb;

		if ( in_array( $table_name, $wpdb->get_col( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table_name ), 0 ), true ) ) {
			return true;
		}

		$wpdb->query( $create_sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared

		return in_array( $table_name, $wpdb->get_col( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table_name ), 0 ), true );
	}

	/**
	 * Add a notice if table creation fails.
	 *
	 * @param string $table_name Name of the missing table.
	 */
	protected function add_create_table_notice( $table_name ) {
		add_action(
			'admin_notices',
			function() use ( $table_name ) {
				echo '<div class="error"><p>';
				printf(
					/* translators: %1$s table name, %2$s database user, %3$s database name. */
					esc_html__( 'WooCommerce %1$s table creation failed. Does the %2$s user have CREATE privileges on the %3$s database?', 'woocommerce' ),
					'<code>' . esc_html( $table_name ) . '</code>',
					'<code>' . esc_html( DB_USER ) . '</code>',
					'<code>' . esc_html( DB_NAME ) . '</code>'
				);
				echo '</p></div>';
			}
		);
	}
}


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


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
AI
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
AIContent
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
Assets
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
BlockTypes
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
Domain
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
Images
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
Integrations
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
Patterns
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
Payments
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
Registry
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
SharedStores
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
Shipping
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
Templates
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
Utils
--
28 May 2026 10.39 AM
tdhomesa / tdhomesa
0755
Assets.php
2.772 KB
27 Dec 2023 12.45 AM
tdhomesa / tdhomesa
0644
AssetsController.php
19.673 KB
19 Jan 2026 2.46 PM
tdhomesa / tdhomesa
0644
BlockPatterns.php
7.919 KB
24 Nov 2025 11.10 PM
tdhomesa / tdhomesa
0644
BlockTemplatesController.php
17.979 KB
24 Nov 2025 11.10 PM
tdhomesa / tdhomesa
0644
BlockTemplatesRegistry.php
6.297 KB
1 Sep 2025 11.44 PM
tdhomesa / tdhomesa
0644
BlockTypesController.php
25.031 KB
23 Feb 2026 5.58 PM
tdhomesa / tdhomesa
0644
DependencyDetection.php
10.659 KB
19 Jan 2026 2.46 PM
tdhomesa / tdhomesa
0644
InboxNotifications.php
0.569 KB
27 Dec 2023 12.45 AM
tdhomesa / tdhomesa
0644
Installer.php
4.131 KB
5 May 2026 2.26 PM
tdhomesa / tdhomesa
0644
Library.php
1.061 KB
27 Dec 2023 12.45 AM
tdhomesa / tdhomesa
0644
Options.php
0.328 KB
27 Dec 2023 12.45 AM
tdhomesa / tdhomesa
0644
Package.php
2.717 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644
QueryFilters.php
17.8 KB
24 Nov 2025 11.10 PM
tdhomesa / tdhomesa
0644
TemplateOptions.php
1.206 KB
12 May 2025 9.07 PM
tdhomesa / tdhomesa
0644

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