ACF.php
5 years ago
NinjaForms.php
5 years ago
WPML.php
5 years ago
WPMLColumn.php
5 years ago
WooCommerce.php
5 years ago
WooCommerce.php
23 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AC\ThirdParty; |
| 4 | |
| 5 | use AC\Registrable; |
| 6 | |
| 7 | class WooCommerce implements Registrable { |
| 8 | |
| 9 | public function register() { |
| 10 | add_filter( 'ac/post_types', [ $this, 'remove_webhook' ] ); |
| 11 | } |
| 12 | |
| 13 | public function remove_webhook( $post_types ) { |
| 14 | if ( class_exists( 'WooCommerce', false ) ) { |
| 15 | if ( isset( $post_types['shop_webhook'] ) ) { |
| 16 | unset( $post_types['shop_webhook'] ); |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | return $post_types; |
| 21 | } |
| 22 | |
| 23 | } |