Change “add to cart” text if a user has bought specific products in WooCommerce
问题 I wanted to know if there is a way to replace the woo-commerce "add to cart" button with custom text and url for a specific product if the user has bought that specific product. and I want it happens everywhere (on shop page,product page , ...) 回答1: Try the following that will change the product "add to cart" text if that product has already been bought by the customer on single product pages and archive pages add_filter( 'woocommerce_product_add_to_cart_text', 'custom_add_to_cart_text', 900,