The action hook publish_post
doesn’t work for custom post types. You need to use the following format: publish_{$custom_post_type}
As you are using Woocommerce this post type is product so you want to use:
publish_product
.
Related Posts:
- How to override WooCommerce template files?
- WooCommerce get physical store address
- Woo-commerce | Disable proceed to checkout button in cart page if total in cart less than 15 [closed]
- WordPress query through Products variation stock [closed]
- How to hook on a WooCommerce checkout field?
- Woocommerce – How to add 5 stars to all products to test design
- How can I override these WooCommerce widget cart button functions
- Programatically update Custom Attributes WooCommerce
- How to get woocomerce attributes thumbnail in PHP? [closed]
- Programmatically added variations not showing until clicking Update button
- Editing Header Titles of each details in woocommerce Order Email [closed]
- How to automatically add and show all the product attributes when creating a new product
- Import products to WooCommerce by CSV page won’t open [closed]
- How can i change the design of product sizes [closed]
- Following migration from DEV to LIVE, woocommerce can’t checkout
- Programmatically adding product attributes to WP / Woo commerce
- Display File Types For Woocommerce Downloadable Products On Product Page
- Trying to disable slider for WooCommerce price filter [closed]
- Programmatically setting Woocommerce product price
- Woocommerce reviews xss issue [closed]
- Woocommerce REST API allow normal users make an order
- WooComerce shows blank site (Shop)
- How to update custom field in WooCommerce
- Add product categories to receipt
- Woocommerce specific product template for product type
- How can I use a gravity form to send an e-card?
- How to select default Woocommerce category page
- Creating Product Table using Gutenberg
- I can ‘t display product images based on the label
- SKU for each product on every page
- Woocommerce get billing state manually
- Timber, Twig, and Woocommerce: Last product stays in the cart after checkout
- Woocommerce Cart Default Language Not Changing
- Make this Fast and Queryable
- WooCommerce slider filter for numerical attributes
- Woocommerce Update Causing Internal Server Error [closed]
- Reordering product tab under product image [closed]
- How do I change the default state label for a country on the WooCommerce checkout page?
- remove default pagination on woocommerce shop page
- WooCommerce Tax Filter Not Fired [closed]
- woocommerce – customise notice error in checkout page
- Using a filter to change a path
- Woocommerce, prevent login after registration and redirect to custom URL
- Order with custom order status disappeared once the page is refreshed
- WooCommerce Product detail page: Add content under thumbnails [closed]
- How to add product filter dropdown in woo commerce order page?
- Unable to paste google analytics con header.php [closed]
- wordpress/woocommerce login url not redirecting correctly
- Add Attribute to Woocommerce programatically, doesn’t display front end [closed]
- Link a button to woofunnels model
- Woocommerce – Add additional item if some item wants to be added to the cart?
- Hook “wp_trash_post” executing multiple time in case of bulk trash products
- WooCommerce Subscriptions: Hide one variation subscription
- Contact form 7 send product PDF after submit
- Add sub variations in product page
- Woo commerce product quantity wise SKU
- Override une fonction dans une class Woocommerce
- What to do if images are not displayed in mob. versions of the online store on wordpress?
- WooCommerce (Bookings) + AddOns not always calculating correctly the total
- validation field form registration vendor dokan woocommerce
- Delete unpublished woocommerce products
- List of JS events in the WooCommerce frontend
- WooCommerce custom product type not saving with namespaces
- Woocommerce / Product Columns on Shop Loop / Responsive
- Redirecting orders by company field
- WooCommerce Product Search box with 3 dropdown menus
- Split taxonomies on different pages
- woocommerce REST api on the website’s front-end
- How to do_action after some plugin{woocs} loaded?
- How can I change field values of posts before displaying
- Editing fields required in the WooCommerce / WordPress registration form [closed]
- WC Booking query bookings with date ranges
- The orders in WooCommerce admin are hidden (they have the “hidden” CSS class)
- Disable theme WooCommerce template [closed]
- WooCommerce: how to set stock per attribute on variable product
- How to display products in sidebar in 2 columns?
- Replace “Add to cart” by a link to contact page on specific product
- Adding price to woocommerce cart item with get_price gets multiplied with 3?
- Increase load-out-page speed
- WooCommerce Stucked (?) – Edit dimensions
- Use Product Attribute in conditional tag
- How to add a fixed shopping cart button on the bottom of the page?
- How to Display Amount of products being displayed out of the amount in category – WordPress/Woocommerce
- Echo SKU in WooCommerce Conformation page [closed]
- PHP Warning: Error while sending QUERY packet
- Add category description on product page (Woocommerce)
- Hide .woocommerce-price-suffix on the product list page
- Woocommerce cart displays outdated prices [closed]
- Adding Extra Customer Email In Woocommerce Checkout
- How to override email text New Customer Order?
- How do I create a array custom field for use with facetwp.com?
- How to add my theme’s style to woocommerce blocks?
- Adding a column to woocomerce admin order page that can be sorted
- WordPress error
- Hide price, “add to cart” button and show message “Please log in to shop” [closed]
- Auto generating API keys using the Application Authentication Endpoint [closed]
- Is there a way to conditionally check if i’m on product variation page url like mydomain.com/myproduct?attribute_pa_color=red
- Critical error on woocommerce checkout page
- Can’t add variable products since update WooCommerce [closed]
- Add custom ID to WooCommerce product tab