midwestE
Forum Replies Created
-
@gaurav1092 very much appreciate that!
Any progress here, just one small line of code ??
Still hoping to get this hook added
Specifically we have a plugin that uses the cache to store an array of the results of a process. When it is retrieved, since it is an empty array, the wp-object-cache.php get method incorrectly returns false. Because the subsequent function is strongly typed, the subsequent functions expecting an array will fatal error.
function strong_type_function(array $array) {
// do work
}
function another_function(): array {
$should_be_array = wp_cache_get(‘my_array_items’);
$result = strong_type_function($should_be_array);
return $result;
}// will fatal error
wp_cache_set(‘my_array_items’, []);
another_function();The above would fatal error because the get method returns false instead of the stored empty array. I’m sure you can imagine there are many other scenarios where returning a boolean when storing other types can be very problematic.
Why would the cache not return exactly what was stored in all cases?
Any follow up here? Maybe I’m missing something but it’s a pretty straightforward. Thank you!
public function ast_open_inline_tracking_form_fun() { $permission = apply_filters('ast_open_inline_tracking_form_permission', 'manage_woocommerce'); if ( ! current_user_can( $permission ) ) { exit( 'You are not allowed' ); }
This is all that is needed
Would allow us to use
add_filter('ast_open_inline_tracking_form_permission', function ($permission) { return 'edit_shop_orders'; });
Just a bump here, I got the most recent version and don’t see any filter available on line 492
I know a release has not been made yet, but do you have a name for the filter yet, so i can implement it in advance? Currently, I have the source edited and I hate to do that
Very much appreciate it, thank you so much for understanding our needs
Just to be clear, you need to delete the top level (global) product attribute term before removing it from the product. Not the attribute from the product.
I believe you misunderstood where the term needs to be removed because you mention “This should allow the smart purge feature to clear the cache for this particular product and refresh the product data.”
That’s the issue, the product is not edited. The attribute term that the product already has is deleted without the product being edited.
Thank you. To be clear, this is a bug, not a feature
I don’t think it will be quite that easy. Ideally they would add a filter that will allow developers to determine when to engage the cache and when not to.
Otherwise, I think the current user role would need to be checked to see if they belong to the customer role.
Following up here again. Problem still persists in most recent version of this plugin.
Forum: Plugins
In reply to: [TrackShip for WooCommerce] Order page js errorAlso line ~868
jQuery(document).click(function (event) { var $trigger = jQuery(".woocommerce-layout__activity-panel"); if ($trigger !== event.target && !$trigger.has(event.target).length) { jQuery('#activity-panel-tab-help').removeClass('is-active'); jQuery('.woocommerce-layout__activity-panel-wrapper').removeClass('is-open is-switching'); } });
Thank you for being open and responsive, I appreciate it! Adding a good review ??
Oops I forgot I already reviewed, 5 stars ??
- This reply was modified 2 years, 9 months ago by midwestE. Reason: Oops!