Skip to content

Commit ee6d8a0

Browse files
authored
gpfup-count-files.js: Migrated.
1 parent e21b59b commit ee6d8a0

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

experimental/gpfup-count-files.js

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
jQuery(function() {
2-
// Update "123" to your form ID and "4" to your File Upload field ID.
3-
if (typeof window['GPFUP_123_4'] === 'undefined') {
4-
return;
5-
}
6-
7-
// Update "123" to your form ID and "4" to your File Upload field ID.
8-
var store = window.GPFUP_123_4.$store;
9-
10-
store.subscribe(function(mutation, state) {
11-
if (mutation.type !== 'SET_FILES') {
12-
return;
13-
}
14-
// Update "5" to your Single Product field ID - or - update `#input_123_5_1` to your desired input's HTML ID.
15-
jQuery( '#input_123_5_1' ).val( state.files.length ).change();
16-
});
17-
});
1+
/**
2+
* We're no longer using the experimental folder for experimental snippets. 🚧
3+
* You can now find the snippet here:
4+
* https://github.com/gravitywiz/snippet-library/blob/master/gp-file-upload-pro/gpfup-count-files.js
5+
*/

0 commit comments

Comments
 (0)