1 2 3 4 5 6 7 8 9 10 11 |
function lw_gpf_exclude_product($excluded, $product_id, $feed_format) { // Return TRUE to exclude a product, FALSE to include it, $excluded to use the default behaviour. if (strpos($_SERVER['REQUEST_URI'], '/woocommerce_gpf/83e2cc41de7757ea/') !== false){ if (COUNTRY_NAME == 'Australia' && $product_id != 260415 ) { return TRUE; } } // If not in the above categories use the default behaviour. return $excluded; } add_filter( 'woocommerce_gpf_exclude_product', 'lw_gpf_exclude_product', 11, 3); |