Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP error Call to a member function get() on null, PFW-664 #1477

Merged
merged 4 commits into from
Jul 23, 2020

Conversation

kcppdevelopers
Copy link
Contributor

No description provided.

@@ -0,0 +1,34 @@
<?php
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic Job @kcppdevelopers
I like this function file to handle the sessions.

@@ -534,7 +534,7 @@ public function ec_add_body_class($classes) {
if (!class_exists('WooCommerce') || WC()->session == null) {
return $classes;
}
$paypal_express_terms = WC()->session->get('paypal_express_terms');
$paypal_express_terms = angelleye_get_session('paypal_express_terms');
if ($this->ec_is_checkout() && $this->function_helper->ec_is_express_checkout()) {
$classes[] = 'express-checkout';
if ($this->show_on_checkout && isset($paypal_express_terms)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kcppdevelopers Here you are using the condition isset($paypal_express_terms), that will always evaluate to true even if the function return false. So I think we need to change it.

@deepakmaurya deepakmaurya merged commit 625df3e into release Jul 23, 2020
@deepakmaurya deepakmaurya deleted the PFW-664 branch August 8, 2020 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants