You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,8 @@ easily and silently. A WooCommerce product with 40 variations can have over 1300
14
14
form items, and when saving the product you have no idea that much of that data is being
15
15
discarded.
16
16
17
-
Luckily the maximum number of accepted parameters can be changed in php.ini The problem is,
17
+
Luckily [the maximum number of accepted parameters can be changed in php.ini](http://docs.woothemes.com/document/problems-with-large-amounts-of-data-not-saving-variations-rates-etc/)
18
+
The problem is,
18
19
many site owners have no idea this needs to be done until it is too late and their
19
20
WooCommerce store has lost half its product variations.
20
21
@@ -31,7 +32,7 @@ items the server will accept when the page is generated, so it has a number to c
31
32
32
33
### Client-side JavaScript
33
34
34
-
The simplest way to implement the check is to use this JavaScript in the jQuery ready()
35
+
The simplest way to implement the check is to use this JavaScript in your jQuery ready()
35
36
function:
36
37
37
38
$('form').maxSubmit({max_count: 1000});
@@ -43,8 +44,8 @@ dialog. You can target specific forms with different settings if you wish.
43
44
44
45
### Server-side Code
45
46
46
-
The server limit (1000 in this case) needs to be passed into the script above. This can
47
-
be found with a simple PHP function like this:
47
+
The server limit (1000 in the above example) needs to be calculated dynamically on the
48
+
server. It can be found with a simple PHP function like this:
48
49
49
50
/**
50
51
* Get the submission limit.
@@ -55,7 +56,7 @@ be found with a simple PHP function like this:
55
56
* apply to POST forms, so POST is important. The REQUEST max vars is
56
57
* another thing to consider, as it will be the sum of GET and POST parameters.
57
58
*/
58
-
function getFormSubmissionLimit($default = false)
59
+
/* public */ function getFormSubmissionLimit($default = false)
59
60
{
60
61
// All these ini settings will affect the number of parameters that can be
61
62
// processed. Check them all to find the lowest.
@@ -65,8 +66,10 @@ be found with a simple PHP function like this:
0 commit comments