Automattic\WooCommerce\Database\Migrations

MigrationHelper::escape_schema_for_backtick()public staticWC 1.0

Helper method to escape backtick in various schema fields.

Метод класса: MigrationHelper{}

No Hooks.

Return

Array. Schema config escaped for backtick.

Usage

$result = MigrationHelper::escape_schema_for_backtick( $schema_config ): array;
$schema_config(array) (required)
Schema config.

Code of MigrationHelper::escape_schema_for_backtick() WC 7.1.0

public static function escape_schema_for_backtick( array $schema_config ): array {
	array_walk( $schema_config['source']['entity'], array( self::class, 'escape_and_add_backtick' ) );
	array_walk( $schema_config['source']['meta'], array( self::class, 'escape_and_add_backtick' ) );
	array_walk( $schema_config['destination'], array( self::class, 'escape_and_add_backtick' ) );
	return $schema_config;
}