WooCommerce::define_tables()
Register custom tables within $wpdb object.
Method of the class: WooCommerce{}
No Hooks.
Return
null
. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->define_tables();
WooCommerce::define_tables() WooCommerce::define tables code WC 9.2.3
private function define_tables() { global $wpdb; // List of tables without prefixes. $tables = array( 'payment_tokenmeta' => 'woocommerce_payment_tokenmeta', 'order_itemmeta' => 'woocommerce_order_itemmeta', 'wc_product_meta_lookup' => 'wc_product_meta_lookup', 'wc_tax_rate_classes' => 'wc_tax_rate_classes', 'wc_reserved_stock' => 'wc_reserved_stock', ); foreach ( $tables as $name => $table ) { $wpdb->$name = $wpdb->prefix . $table; $wpdb->tables[] = $table; } }