Skip to content
Snippets Groups Projects
Select Git revision
  • 58a8ee24ae805b49a39b8763872ece812392012a
  • master default protected
  • fix/deprecated_functions
  • devel
  • feat/translations
  • feat/upgrade_to_pro_url
  • feat/lang
  • bugfix/require-interface
  • bugfix/require-once-error
  • feature/activation-hooks
  • feature/template-loader
  • feature/template-renderer
  • feature/plugin-activation
  • feature/hookable-object
  • feature/builder-pattern
  • 2.1.2
  • 2.1.1
  • 2.1.0
  • 2.0.0
  • 2.0.0-beta1
  • 1.4.4
  • 1.4.3
  • 1.4.2
  • 1.4.1
  • 1.4
  • 1.3.3
  • 1.3.2
  • 1.3.1
  • 1.3.0
  • 1.2.0
  • 1.1
  • 1.0
32 results

AbstractPlugin.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
    			);
    		}
    
    	}
    }