Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plugin-republic/153ad84fa51a4948258ade7427927405 to your computer and use it in GitHub Desktop.
Save plugin-republic/153ad84fa51a4948258ade7427927405 to your computer and use it in GitHub Desktop.
Filter validation message for maximum number of child products
<?php
/**
* Filter validation message for maximum number of child products
*/
function prefix_filter_max_children_validation_notice( $message, $field_label, $max_products ) {
// You can write a custom message here
// $field_label is the name of the field
// $max_products is the maximum number of products allowed
return $message;
}
add_filter( 'pewc_filter_max_children_validation_notice', 'prefix_filter_max_children_validation_notice', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment