Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save xlplugins/ced7e1f0a3aaecde8711ff58e64b8fd8 to your computer and use it in GitHub Desktop.

Select an option

Save xlplugins/ced7e1f0a3aaecde8711ff58e64b8fd8 to your computer and use it in GitHub Desktop.
allow woocommerce product bundle type in upsell
add_filter(
'wfocu_offer_product_types',
function ( $types ) {
// Only expose bundles when WooCommerce Product Bundles is actually active.
if ( class_exists( 'WC_Product_Bundle' ) && ! in_array( 'bundle', (array) $types, true ) ) {
$types[] = 'bundle';
}
return $types;
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment