oop – plugin architecture Question: How to avoid using transients

I create an internal plugin that offers a filtering mechanism with AJAX for each post type, depending on the configuration I saved in a JSON.

When the plugin is loaded, I have to set the callback for the AJAX call, and I set that straight away (I'll stick to OOP):

$gfb = FilterBuilder::get_instance();
$action_filter_reg_instance = new ActionFilterRegistration();
$action_filter_reg_instance->add_action( 'wp_ajax_process_filters', $gfb, 'process_filters_callback' );

This sets the callback and it works fine … but this instance of $ gbf is lost when the page that shows the posts is loaded and I have to set other properties when loading the template.

For example, when the page that shows the posts is loaded, I create a new FilterBuilder object and pass the query arguments to it, which are then stored in the instance as a property of the class.

When the callback is called, it is a separate instance of a FilterBuilder, so there is nothing in this class instance that I have defined in the template.

This puts me in a difficult situation because I want to have access to the query arguments that were defined when this particular instance was created.

I initially used transients to share the query arguments that the template instance defined through the callback function, but it just feels wrong. In addition, I believe that transients are of maximum length and can therefore explode if this limit is reached.

What other options are there? Maybe serialize the template class instance into a JSON and load it from the recall? That also sounds … a little more.

I don't want to use global variables … interested in what you think would be an elegant approach to work around this problem.

Thank you for taking the time to read this! πŸ‘πŸ½

Plugin Development – The Hook & # 39; woocommerce_add_to_cart_redirect & # 39; no longer works

I try to redirect straight to checkout if the user clicks "add to cart" and my code worked before, but somewhere along the way it doesn't work anymore and I can't say exactly why.

add_filter( 'woocommerce_add_to_cart_redirect', 'rd_redirect_checkout_add_cart' );

function rd_redirect_checkout_add_cart() {
   return wc_get_checkout_url();
}

If I click on Add to cart now, the page will be updated, the article will be added to the shopping cart and that's it. If I press it again, it will be updated again and added to the shopping cart. There is no redirection.
This is the URL site.com/?add-to-cart=499

I tried to disable all plugins, remove the redirect code and use the redirect plugin, tried everything and don't know what else to do.

Any ideas would be helpful.
Thanks a lot.

WooCommerce Custom Price Plugin

With WooCommerce's custom price plugin, you can suggest a price and let customers decide what they want to pay for the product. It enables customers to name their prices. With the WooCommerce custom pricing plugin, you can set the minimum and maximum amount to confirm that you are making a profit. You can also create donation products and allow supporters to decide how much they can give. You can also hide the proposal and the minimum price of the products. The cost of this expansion is only $ 49 with a money-back guarantee.

Class Main (Minecraft Plugin) cannot be found

I'm new to this area, I'm sorry.
I decompiled a plugin with the JD-GUI program and took the src and imported it into Eclipse, changed only a few strings and then exported it to the JAR file. No error occurred when exporting. When starting the server with the plugin, however, the following error is displayed.

Console error
[09:55:56 ERROR]: & # 39; plugins LootingShop.jar & # 39; could not go to folder & # 39; plugins & # 39; getting charged.
org.bukkit.plugin.InvalidPluginException: Main class `br.com.earthsurvival.shop.EarthShop & # 39; cannot be found

Pastebin: https://pastebin.com/V7dRjpz0

Main code

Pastebin: https://pastebin.com/qPTQc6fp

Plugin.yml

Pastebin: https://pastebin.com/DxfpPQWe

Folder structure

Pastebin: https://imgur.com/GCGrisC

Wpml plugin – Redirect some of the languages ​​on a multilingual site

I have a site that uses WPML to display three languages.

  • DE – www.domain.com
  • FR – www.domain.com/fr/
  • ES – www.domain.com/es/

I want to set up redirects so that all EN and FR pages (home and inside pages) (page by page) are redirected to pages in another domain. However, a user who visits the start page with the browser language set to ES will be redirected to www.domain.com/es/.

I can use the redirect plugin for EN and FR redirects, but this way, all users (including users with a browser language set to ES) are automatically redirected to the new domain. In other words, ES redirection does not work because it is second in the redirection queue.

What are my options?

WooCommerce Product Bundle Plugin

With the plugin for WooCommerce product packages you can sell products in packages. You can add simple, variable and digital products in packages. The WooCommerce package for product packages is the best plugin to offer your customers product offers. You can also set an optional or mandatory product for your customers. This plugin also offers the ability to set the amount of each product you want to sell in packages. The cost of this plugin is only $ 29 with a 100% money back guarantee.

WooCommerce Countdown Timer Plugin

With the WooCommerce Countdown Timer Plugin, you can display a countdown timer on the home page or on the product pages. You can easily customize the timer. The WooCommerce Countdown Timer Plugin enables different types of timer styles, so you can choose one that suits your website. Here you can set the position of the countdown timer under the product image or under the product price. You can also customize the colors and text. The cost of this expansion is only $ 49 with a money-back guarantee.

Is there a WordPress plugin that can achieve this type of design?

I know that wix can do this, but the cost is high, so I use WordPress hosting, but just like the title says: is there a WordPress plugin that does this type of design for a t-shirt store page can reach my blog?

[IMG]

I want this to appear on a separate page with only t-shirt designs and calls to action. Any help with this is appreciated. and post a picture like this in order to help.