WooCommerce has a strange way to register its tables.
$sql = "
SELECT DISTINCT TABLE_NAME
FROM information_schema.columns
WHERE TABLE_NAME LIKE '{$wpdb->prefix}woocommerce_%'";
$tables = $wpdb->get_col( $sql );| <?php # -*- coding: utf-8 -*- | |
| /** | |
| * Plugin Name: MLP Addon: Sync post meta fields | |
| * Plugin URI: https://gist.github.com/toscho/6393c79aacba0983a96a | |
| * Description: Create a custom field, put it into the MLP translation box, and sync it across the sites. | |
| * Version: 2015.03.03 | |
| * Required: 4.0 | |
| * Author: Thomas Scholz <[email protected]> | |
| * Author URI: http://toscho.de | |
| * License: MIT |
| <?php # -*- coding: utf-8 -*- | |
| /** | |
| * Plugin Name: T5 Test Types | |
| * Description: Adds some custom post types and taxonomies for testing purposes. | |
| * Plugin URI: | |
| * Version: 2013.04.12 | |
| * Author: Thomas Scholz | |
| * Author URI: http://toscho.de | |
| * Licence: MIT | |
| * License URI: http://opensource.org/licenses/MIT |
| <?php # -*- coding: utf-8 -*- | |
| /** | |
| * Plugin Name: T5 Excerpt Widget | |
| * Plugin URI: https://gist.github.com/toscho/b318faa2b79d9bb8ffe8 | |
| * Description: Shows the post excerpt in a widget. The widget is visible on single posts only. | |
| * Version: 17.02.15 | |
| * Required: 4.0 | |
| * Author: Thomas Scholz <[email protected]> | |
| * Author URI: http://toscho.de | |
| * License: MIT |
| <?php | |
| /** | |
| * Plugin Name: T5 Page Template Column | |
| * Plugin URI: https://gist.github.com/toscho/f657e323a60f12ad9605 | |
| * Description: Shows the page templates as separate, sortable column. | |
| * Version: 2015.02.14 | |
| * Required: 4.0 | |
| * Author: Thomas Scholz <[email protected]> | |
| * Author URI: http://toscho.de | |
| * License: MIT |
| <?php # -*- coding: utf-8 -*- | |
| /** | |
| * Plugin Name: T5 Refresh RSS Widget | |
| * Plugin URI: https://gist.github.com/toscho/47fc50f875473ee537e6 | |
| * Description: Refresh the feed for the built-in RSS widget every two hours. | |
| * Version: 03.01.15 | |
| * Required: 4.0 | |
| * Author: Thomas Scholz <[email protected]> | |
| * Author URI: http://toscho.de | |
| * License: MIT |
| <?php | |
| /* Plugin Name: T5 Category Feed Links */ | |
| add_action( 'wp_head', function() { | |
| $cats = get_categories(); | |
| $html = '<link rel="alternate" type="%1$s" title="Category %2$s" href="%3$s" />'; | |
| $type = feed_content_type(); | |
| foreach ( $cats as $cat ) { |
| <?php | |
| add_action( 'wp_footer', function() { | |
| $mlp_language_api = apply_filters( 'mlp_language_api', NULL ); | |
| if ( is_a( $mlp_language_api, 'Mlp_Language_Api_Interface' ) ) { | |
| $args = [ | |
| 'site_id' => get_current_blog_id(), | |
| 'content_id' => get_queried_object_id(), |
| <?php # -*- coding: utf-8 -*- | |
| interface Url { | |
| public function get_url(); | |
| } | |
| class Basic_Url implements Url { | |
| private $url; |
| <?php # -*- coding: utf-8 -*- | |
| /** | |
| * Plugin Name: Post Meta Test | |
| * Description: Adds a simple post meta field below the title to the post editor screen. | |
| * Plugin URI: http://marketpress.com/ | |
| * Version: 2014.09.12 | |
| * Author: MarketPress, Thomas Scholz | |
| * Author URI: http://marketpress.com/ | |
| * Licence: GPL 2 | |
| * License URI: http://opensource.org/licenses/GPL-2.0 |
WooCommerce has a strange way to register its tables.
$sql = "
SELECT DISTINCT TABLE_NAME
FROM information_schema.columns
WHERE TABLE_NAME LIKE '{$wpdb->prefix}woocommerce_%'";
$tables = $wpdb->get_col( $sql );