Fixed legacy WC_Checkout->posted warning.

WC_Checkout->get_posted_data() is a protected method and third party
integrations should use $_POST.
This commit is contained in:
Claudio Sanches 2017-04-18 18:12:42 -03:00
parent 372898d12f
commit 086b60a871
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ class WC_Checkout {
case 'checkout_fields' : case 'checkout_fields' :
return $this->get_checkout_fields(); return $this->get_checkout_fields();
case 'posted' : case 'posted' :
wc_doing_it_wrong( 'WC_Checkout->posted', 'Use $_POST directly, or the WC_Checkout->get_posted_data() method.', '3.0.0' ); wc_doing_it_wrong( 'WC_Checkout->posted', 'Use $_POST directly.', '3.0.0' );
return $this->legacy_posted_data; return $this->legacy_posted_data;
case 'shipping_method' : case 'shipping_method' :
return $this->legacy_posted_data['shipping_method']; return $this->legacy_posted_data['shipping_method'];