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
- wp_head filter not executed inside custom class
- Possible to overwrite load_template function in plugin using functions.php
- How to customize WP_Error (REST JWT authentication plugin) [closed]
- How to return a specific attribute
- Automatic recurring payment using YITH subscription and Dokan Stripe
- Woocommerce checkout page broken when set as a checkout in woocommerce settings [closed]
- How to get custom minimum price in Woocommerce
- Excluding specific post from custom next/previous theme function
- Woocommerce Export and import Orders
- Edit all $wp_scripts at once to $in_footer = false
- Edit all $wp_scripts at once to $in_footer = false
- WordPress Phone Field Check (use numbers, spaces and pluses)
- Can export gallery but can’t import it Wp all import
- Restrict posts to customers with complete WooCommerce orders only
- Display custom product option in admin order details
- WooCommerce – I want to add functionality of one plugin to another plugin — best approach?
- Change Dashboard URL from wp-admin to wp-admin/index.php
- Get product categories and add them to a custom taxonomy
- How to make WooCommerce payment method field optional?
- How to Get Category Name When Export Products
- How To Use do_shortcode with WooCommerce One Page Checkout
- Displaying page content from plugin, inside exising empty WP page
- Want to create custom design of progress indicator in wpforms
- Cannot read properties of undefined (reading ‘firstChild’) using photoswipe in product page
- woocommerce remove coupon link does not work
- WordPress – Ultimate Auction for WooCommerce
- How to makes changes on the shop/category/tag pages but not on the product pages in woocommerce?
- Plugins to generate reflinks in WordPress
- Working on a product group in wordpress, where user choose how many children, wife and husband
- Use a hook or filter, or overwrite this Gamipress function?
- product available stock day by day
- Hook from plugin doesn’t fire up from external PHP script
- Add hook after content without formatting
- Sold out Label for variable products which are partially sold out
- How to convert Currency from USD to other IP Based currency in Php function
- wp_query ‘s’ parameter does not work with WC_AJAX
- Grouping imported products and showing variations based on selected product
- Add a Custom email notification to WC actions
- Hide fields in woocommerce settings
- woocommerce – adding wrapper around custom made woocommerce form fields
- How to add custom plugin data to the cart in woocommerce using custom button on product page?
- How to hide a woocommerce setting tab from admin & shop manager?