Skip to content
Advertisement

Multiple IDs rule in php code WooCommerce

I’m simply trying to make this php code work with multiple IDs

JavaScript

Trying this doesn’t work –

JavaScript

What’s the correct formatting?

Advertisement

Answer

Try this.

JavaScript

Learn about in_array here : https://www.w3schools.com/php/func_array_in_array.asp

Keep adding items in $ids as required.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement