Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xlplugins/71de82e000e8a8d9eddba6e54bde63eb to your computer and use it in GitHub Desktop.
Save xlplugins/71de82e000e8a8d9eddba6e54bde63eb to your computer and use it in GitHub Desktop.
Allow Directory pro postypes in Funnelkit Plugins
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