in filtering one of the meta, you can stop capture depending of the order content
add_filter("get_post_metadata", function ($value, $object_id, $meta_key, $single) {
if ("_stripe_charge_id" === $meta_key) {
$order = wc_get_order($object_id);
if (???) {
// stop capture
$value = FALSE;
}
}
return $value;
}, 10, 4);
Related Posts:
- How to check current user before all actions and filters?
- Passing a parameter to filter and action functions
- Get a list of all registered actions
- How can I edit post data before it is saved?
- Where is the best place to use add_filter
- How to only hook on Single.php after content?
- Use external link in the add sub menu
- Very stubborn wp_register_script / add_action vs remove
- How to prepend to the_title for admin-side plugin’s use
- do_action and hook methods
- How to filter content post only on save
- Filter or action hook to insert content on admin pages before tag
- Woocommerce Shipping module available only for type of products [closed]
- How to prevent action in ajax request, when in admin side?
- What is the purpose of $merged_filters?
- How do action and filter hooks understand where to look for the core function that we hooked our function to them
- Automatically add attributes to woocommerce product?
- CampaignMonitor for WooCommerce – Move subscribe button [closed]
- Get Time Taken By Each Action Hook in WordPress
- Filtering WooCommerce Orders by Category
- Plugin developer automated documentation
- Is there a hook to Intercept al urls from a webpage and redirect to a page
- WordPress user account activation
- External Script Using WP – Hooks / Actions Not Working?
- Redirect to another page using contact form 7? [closed]
- Is there a way to figure out which action/filter invoked a function?
- Using add_action before add_filter on a plugin?
- remove_action not removing add_action from constructor
- Editing wp-config.php
- WooCommerce: after install hook
- Advanced Custom Fields (acf) – Filter Relationship by Taxonomies not Post Type
- Override a Plugin Function
- How to remove products-links after the product title using remove_action
- How to use add_action for multiple instances of the same class
- How to hook into action/filter call
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- Edit post image attributes on fly?
- apply_filters(woocommerce_get_item_data, …) Causing errors when adding to cart
- WooCommerce Product Table – filter query on attributes
- Disable WC Bookings automatic order completion [closed]
- How to Unhook actions/filters in within Class in plugin
- Nested Actions and Filters
- Use action, filter, or hook to append HTML to WordPress plugin function
- Remove action added in plugin class from theme
- {status}_{post_type} does not run correctly?
- Change hook to add_action in a plugin class
- What action or filter can I use to change all the html returned from server for a page?
- Why can’t I shove an instance of a class into a variable from a do_action hook?
- Passing a parameter to filter and action functions
- change output location of plugin function using a custom hook
- Filter for modifying image on upload
- Which filters or actions involve with index page for plugin?
- add query string to all pages after user logged in
- Order shipped by which driver[hook for woocoomerce order staus changed and popup in admin panel ] [closed]
- Which action/filter can i use for a Member Plugin [closed]
- How to add product thumbnail on orders list on backend?
- Brands Filter Not Working For On Sale Products
- WooCommerce Attribute Mapping
- How to customize WP_Error (REST JWT authentication plugin) [closed]
- Woocommerce override mini-cart.php not working [closed]
- Auto Load Plugin Hooks inside Must Use Plugin
- WP WC CLI – WooCommerce setup store with wp-cli [closed]
- Shortcode display outside the div
- $woocommerce->cart is null inside WordPress Rest API
- Woocommerce custom shared taxonomy
- Sort products without thumbnail in WooCommerce shop page
- Create or Update thousands of woocommerce products via PHP
- Automatically adding category filter based on search string
- Changing image URLs in media library
- add action wp_head not working
- Woocommerce sidebar not loading in theme
- How to change currency programmatically on creating order action?
- Removing an action, or dequeueing style – Both not working
- Serve different files depending on OS/Browser
- Change the method of a class from child function.php
- Get posts from WP_Query and format them on admin_head
- How to find the origin of a file upload from within wp_handle_upload?
- How to get the element ID from new menu list that added with add_filter()?
- woocommerce_package_rates not fired when wordpress woocommerce accessed as non ajax
- How to send an automated email to the customers when product is added woocommerce
- Modifying a .js Function for Print [QZ Tray, WooCommerce POS]
- woocommerce product countdown not showing in variable product? [closed]
- Replacing a plugin function with a custom renamed function doesn’t work
- Multiple Billing forms in WooCommerce (one billing form per product)
- Product queue for my subscription box
- PHP Error When a plugin is active
- Modify page title and subtitle with a plugin
- override filter in a plugin
- Trying to add a page template for my custom post type from a plugin, but it will not display in the template dropdown unless file is in theme
- how to execute some code after a post is published in WordPress [duplicate]
- Make downloadable ebook read online without download option
- Display Woocommerce attribute name above product title
- In woocommerce, is there any way to empty wordpress default mini cart when order placed?
- In woocommerce, is it possible to make payment of one customer order by another customer?
- Tracking sales/conversions in Woocommerce using Google Analytics
- How to Save settings of custom tab product page in admin side in a database?
- Holding 2 wp_user in the same action (to update billing_email when user_email is updated)
- Simply Exclude – Category feed exclusion is excluding from category feed instead of just the main feed
- OOP Plugin: Where should I place the action hooks in the class?
- Difficult case to solve – Select + select = result(related data)