save merchant email when merchant comes back from onboarding

This commit is contained in:
David Remer 2020-09-24 10:42:38 +03:00
parent 9f45ca618f
commit 1b3061f59a

View file

@ -97,8 +97,9 @@ class SettingsListener {
* phpcs:disable WordPress.Security.NonceVerification.Missing
* phpcs:disable WordPress.Security.NonceVerification.Recommended
*/
if ( isset( $_GET['merchantIdInPayPal'] ) ) {
if ( isset( $_GET['merchantIdInPayPal'] ) && isset( $_GET['merchantId'] ) ) {
$this->settings->set( 'merchant_id', sanitize_text_field( wp_unslash( $_GET['merchantIdInPayPal'] ) ) );
$this->settings->set( 'merchant_email', sanitize_text_field( wp_unslash( $_GET['merchantId'] ) ) );
$this->settings->persist();
}
// phpcs:enable WordPress.Security.NonceVerification.Missing