add get-schema

This commit is contained in:
Paul Sealock 2022-05-20 11:48:27 +12:00
parent 5de604e490
commit 7cfdbe4922
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?php
/**
* Helper methods for extracting database schema.
*
* @package WooCommerce
*/
// phpcs:disable PHPCompatibility.Classes.NewLateStaticBinding.OutsideClassScope
/**
* Get database schema.
*/
function get_schema() {
$schema = function () {
return static::get_schema();
};
return $schema->call( new \WC_Install() );
}
echo( esc_sql( get_schema() ) );