Invalidating Paragraph Cache

I’m working on a paragraph type that will need to display on a very limited number of pages but has some specific functionality where the preprocess function will need to run each time. In my preprocess function, I’ve tried various iterations of the following: $variables[‘elements’][‘#cache’][‘max-age’] = ‘0’; $variables[‘elements’][‘#cache’][‘contexts’][] = ‘url.path’; $variables[‘elements’][‘#cache’][‘contexts’][] = ‘url.query_args:r’; $variables[‘elements’][‘#cache’] =…

Override WP Class Private Function

I’m new to community, I think you experts can help me in this. I have plugin installed and i want to its overwrite one function which is in class <?php class wf_fedex_woocommerce_shipping_admin{ private function wf_user_permission($auto_generate=null){ $current_minute=(integer)date(‘i’); if(!empty($auto_generate) && ($auto_generate==md5($current_minute) || $auto_generate==md5($current_minute+1) )) { return true; } $current_user = wp_get_current_user(); $user_ok = false; $wf_roles = apply_filters(…

How to prevent a user from deleting an entity referenced node before deleting the referencing (child) node first?

I have a Content Type called ItemRequest, and another Content Type called ItemOrder. One of the fields in ItemOrder is “Related Item Request” that is an Entity Reference to ItemRequest. Each ItemOrder has at least one Related Item Request. How do I ensure that a parent ItemRequest node can only be deleted if it does…