Hi Cristián
O.k, this is where we are at the present. First my shortcode runs to check
If there are any issues.
In either case I run the s2Member-Pro-PayPal-Form register="1" etc shortcode.
The entire form is loaded into a var via the ws_plugin__s2member_pro_sc_paypal_form
filter.
I add my input variables to the end of the form with a cheeky
- Code: Select all
$form = str_replace(“</form>”,“my input vars</form>”,$form)
If my shortcode brings up any errors I insert my error code between the
id="s2member-pro-paypal-registration-form-response-div" div
(using strpos to locate the id position and some other cmd’s to find the
position of the end of the tag '>') then use substr_replace
to insert my error code into the response code div section.
All good so far. If my shortcode generates an error I would like to
suppress any S2 Pro errors (else two response div’s looks ugly).
To prevent this I have used
- Code: Select all
unset($_POST["s2member_pro_paypal_registration"]);
to suppress the display of S2 Pro user input.
This removes user inputs from the fields but S2 still seems to be
able to produce it’s own errors. Even with cookies disabled S2 Pro
can still generate an error i.e if using an email address that is already
in use (this is fine but I don’t want want it to show whilst my short code
is displaying an error).
This is where I could use your help. What $GLOBALl variable do I need
to unset or alter in order to halt S2 Pro whilst my shortcode has
determined an error?
Ultimately what I would like is if my shortcode determines an error on a
submitted page I would like S2 Pro to treat the page as a non $_POST
(accessed via click) page (if that makes any sense).
Many thanks
Peter..