Skip to content
Snippets Groups Projects
Select Git revision
  • 96934a319ee489035a1675301f7c654d1524657c
  • main default protected
  • v0.10
  • 0.10.6
  • 0.10.5
  • 0.10.4
  • 0.10.3
  • 0.10.2
  • 0.10.1
  • 0.10.0
  • 0.9.1
  • 0.9.0
12 results

LoggerExtension.php

Blame
  • CustomOrdersTableCompatibility.php 718 B
    <?php
    
    namespace WPDesk\Init\Extension\CommonBinding;
    
    use WPDesk\Init\Binding\Hookable;
    use WPDesk\Init\Plugin\Plugin;
    
    class CustomOrdersTableCompatibility implements Hookable {
    
    	/** @var Plugin */
    	private $plugin;
    
    	public function __construct( Plugin $plugin ) {
    		$this->plugin = $plugin;
    	}
    
    	public function hooks(): void {
    		add_action('before_woocommerce_init', $this);
    	}
    
    	public function __invoke(): void {
    		$features_util_class = '\\' . 'Automattic' . '\\' . 'WooCommerce' . '\\' . 'Utilities' . '\\' . 'FeaturesUtil';
    		if ( class_exists( $features_util_class ) ) {
    			$features_util_class::declare_compatibility(
    				'custom_order_tables',
    				$this->plugin->get_basename(),
    				true
    			);
    		}
    
    	}
    }