themovation / th-widget-pack

Theme Widget Pack
19 stars 6 forks source link

th-widget-pack/inc/helper-functions.php #165

Closed BenHaase closed 6 years ago

BenHaase commented 6 years ago

I had a fatal error with the get_post call on line 51 of th-widget-pack/inc/helper-functions.php that was crashing a site I maintain. The site is running the most recent versions of Wordpress and Elementor. I don't code php often so this may not be the best way to do it but here is a quick fix for the issue.

Replaced: $page = \Elementor\PageSettings\Manager::get_page( $post_id );

With: $page; $document = \Elementor\Plugin::$instance->documents->get( $post_id ); if ( $document ) { $page = $document; }

BenHaase commented 6 years ago

I see you got a fix in while I was working on this, disregard.

ryanlabelle commented 6 years ago

Thanks @BenHaase ! All fixed up. :)