No. Look carefully the code I posted. It is not that is wrong - it is simply unneeded and will never run the way it is coded. After the
the code checks if descr AND keywords are NOT empty but this "foreach" will never be reached if both are not empty in the first place. The "foreach" is included in an "if" statement which checks descr OR keywords being EMPTY.
If one of them is empty then the "foreach" will run but in this case the following "if" will not run - one of them is empty...
You replaced the "each" function and added
PHP Code:
if (
!empty($product['meta_description'])
&& !empty($product['meta_keywords'])
) {
break;
}
without taking into account the parent "if" block. This second "if" will never run and it shouldn't be there.