diff --git a/classes/ppom.class.php b/classes/ppom.class.php index acc5a79c..78691342 100644 --- a/classes/ppom.class.php +++ b/classes/ppom.class.php @@ -133,6 +133,11 @@ function __construct( $product_id = null ) { } } + // Retrieve fields with the repeater enabled. + $is_cloned = is_array( $this->fields ) ? array_filter( array_column( $this->fields, 'is_cloned' ) ) : array(); + if ( isset( $this->ppom_settings->productmeta_validation ) && ! empty( $is_cloned ) ) { + $this->ppom_settings->productmeta_validation = 'on'; + } } public static function get_instance( $product_id ) {