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

Label Text not changed on "Out Of Stock" products after changing and saving it in settings #22

Open
funkyClown opened this issue Mar 14, 2023 · 2 comments

Comments

@funkyClown
Copy link

Greetings,

I have encountered an issue with the plugin. When saving the label text in WP Admin -> Settings -> Sold Out Badge for WooCommerce -> Label, the text changes in the settings. The problem is, the labels shown on "Out Of Stock" product does NOT change.
I have tried:

  • incognito mode in browser
  • disabling/re-enabling the plugin
  • uninstalling and reinstalling the plugin(the custom label text stayed as I set it)

I found a quick solution, that needed changing /wp-content/plugins/sold-out-badge-for-woocommerce/classes/Badge.php

	/**
	 * Get badge text
	 *
	 * @return string
	 */
	public static function get_text(): string {
// 		return Settings::get_text( 'wcsob_text' );  //original code
            return 'MyCustomLabelText';
	}

Since this is a hack and should be used only as a short-term solution, I'm hoping someone has an idea, what is the root of this problem.

Software Versions:

  • Sold Out Badge for WooCommerce: Version 4.3.5
  • WP Version: 6.1.1
  • PHP Version: ea-php80
  • WooCommerce: Version 7.5.0

Best Regards

@CharlieEtienne
Copy link
Owner

Hi, it looks like a cache problem... Do you have a cache plugin ?

@funkyClown
Copy link
Author

Hello @CharlieEtienne, sorry for the long response. We're not using any cache plugin. Maybe it had something to do after updating the plugins, but I'm not completely sure, since it was some time ago. The text changes immediately after updating php code, as described in my post.

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

No branches or pull requests

2 participants