Created
February 13, 2024 06:59
-
-
Save xlplugins/71de82e000e8a8d9eddba6e54bde63eb to your computer and use it in GitHub Desktop.
Allow Directory pro postypes in Funnelkit Plugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( ! class_exists( 'Funnelkit_Post_Type_allow' ) ) { | |
class Funnelkit_Post_Type_allow { | |
public function __construct() { | |
add_filter( 'wfob_offer_product_types', [ $this, 'add_post_types' ] ); | |
add_filter( 'wfacp_offer_product_types', [ $this, 'add_post_types' ] ); | |
add_filter( 'fkcart_product_types', [ $this, 'add_post_types' ] ); | |
add_filter( 'wfocu_offer_product_types', [ $this, 'add_post_types' ] ); | |
} | |
public function add_post_types( $supported_post_types ) { | |
$new_post_types = [ | |
'drts_curlstylists_dir_ltg__addon', | |
'drts_curlstylists_dir_ltg', | |
'drts_curlstylists_dir_ltg__subscription' | |
]; | |
return array_merge( $supported_post_types, $new_post_types ); | |
} | |
} | |
new Funnelkit_Post_Type_allow(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment