Latest update broken solution
-
The apparent latest version that updated yesterday – 1.4.0.1 – is broken, at least on the latest WordPress version (4.2.3).
The error resulted in a white-screen on my WordPress install.
The logs show the error is: PHP Fatal error: Call to a member function get_setting_value() on a non-object in /path/wp-content/plugins/stripe/classes/class-stripe-checkout-scripts.php on line 51.
The code is attempting to call an undefined function.
A solution – at least a temporary fix that works in my case – is to remove the call from line 51, as so:
Before change:
if ( ( false !== strpos( $post->post_content, ‘[stripe’ ) ) || ( null !== $sc_options->get_setting_value( ‘always_enqueue’ ) ) ) {
After change:
if ( ( false !== strpos( $post->post_content, ‘[stripe’ ) ) ) {
Which removes this section of the statement:
|| ( null !== $sc_options->get_setting_value( ‘always_enqueue’ ) )
I realise this is a quick and dirty fix, and may result in unforeseen consequences; without having time to dig further into the code I haven’t done a thorough evaluation. The CSS layout is a little wonky on the settings page – not sure if this is an outcome. But the essential functionality is there, and now it works without white-screening my site – in my case at least. If anyone else uses this hack – use at your own risk.
The topic ‘Latest update broken solution’ is closed to new replies.