Title: srlimon's Replies | WordPress.org

---

# srlimon

  [  ](https://wordpress.org/support/users/srlimon/)

 *   [Profile](https://wordpress.org/support/users/srlimon/)
 *   [Topics Started](https://wordpress.org/support/users/srlimon/topics/)
 *   [Replies Created](https://wordpress.org/support/users/srlimon/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/srlimon/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/srlimon/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/srlimon/engagements/)
 *   [Favorites](https://wordpress.org/support/users/srlimon/favorites/)

 Search replies:

## Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[J Cart Upsell and Cross-sell for WooCommerce] Take customer to product page on ADD](https://wordpress.org/support/topic/take-customer-to-product-page-on-add/)
 *  Thread Starter [srlimon](https://wordpress.org/support/users/srlimon/)
 * (@srlimon)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/take-customer-to-product-page-on-add/#post-15840756)
 * Rockstar!
 * The ajax error was fixed when I uninstalled my other side cart plugin (just deactivating
   it didn’t help) all working perfectly now.
    Upgrading to pro version, your support
   has been awesome.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[J Cart Upsell and Cross-sell for WooCommerce] Take customer to product page on ADD](https://wordpress.org/support/topic/take-customer-to-product-page-on-add/)
 *  Thread Starter [srlimon](https://wordpress.org/support/users/srlimon/)
 * (@srlimon)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/take-customer-to-product-page-on-add/#post-15837665)
 * Legend. Worked like a charm!
    With my rudimentary php skills I managed to adapt
   your code to 1 unique product with:
 *     ```
       add_action('wjufw_add_to_cart_parameters', function( $prod ){
       	if ($prod->get_id() == '12629') {
       		$url = get_permalink( $prod->get_id() );
       		echo "href='". $url ."' class='button product_type_simple'";
       	}
       });
       ```
   
 * Any idea how to trigger this Action on all products of a product category?
    I
   tried the below without sucess:
 *     ```
       add_action('wjufw_add_to_cart_parameters', function( $prod ){
       	$prod_cats = wc_get_product_category_list( $prod->get_id() );
   
       	foreach (wc_get_product_category_list( $prod->get_id() ) as $prod_cat) {
       // 		if ( has_term( 'Cards', $prod_cat ) ) { 
       		if (str_contains('Cards' , $prod_cat )) {
       // 		if (strpos('Cards' , $prod_cat) !== FALSE) { 
       			$url = get_permalink( $prod->get_id() );
       			echo "href='". $url ."' class='button product_type_simple'";
       		}
       	}
       });
       ```
   
 * This plugin now does what I need, any chance you’re available to look on the 
   ajax loading error if I give you admin rights? at staging9.thefunguywa.com.au
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[J Cart Upsell and Cross-sell for WooCommerce] Take customer to product page on ADD](https://wordpress.org/support/topic/take-customer-to-product-page-on-add/)
 *  Thread Starter [srlimon](https://wordpress.org/support/users/srlimon/)
 * (@srlimon)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/take-customer-to-product-page-on-add/#post-15831782)
 * How would I do it, even if is suing a filter or hook?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[J Cart Upsell and Cross-sell for WooCommerce] Removing an item is not working](https://wordpress.org/support/topic/removing-an-item-is-not-working/)
 *  [srlimon](https://wordpress.org/support/users/srlimon/)
 * (@srlimon)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/removing-an-item-is-not-working/#post-15831100)
 * Same hapenning to me on deleting a item from side cart.
    URL [https://www.staging9.thefunguywa.com.au/](https://www.staging9.thefunguywa.com.au/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[J Cart Upsell and Cross-sell for WooCommerce] Take customer to product page on ADD](https://wordpress.org/support/topic/take-customer-to-product-page-on-add/)
 *  Thread Starter [srlimon](https://wordpress.org/support/users/srlimon/)
 * (@srlimon)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/take-customer-to-product-page-on-add/#post-15831098)
 * Yes, redirect to product page with custom text (either defined by specific upsell,
   or product or product category)
    This is useful for variable products when customer
   need to choose options (T-shirt size for example) prior to add to cart.
 * See live example
    [https://www.staging9.thefunguywa.com.au/](https://www.staging9.thefunguywa.com.au/)
 * On all pages I removed the “add to cart” buttom/function and replaced to “customeze”&
   linking to product page with this on my functions.php
 *     ```
       add_action( 'woocommerce_is_purchasable', 'hide_add_to_cart_function', 10, 2 );
   
       function hide_add_to_cart_function( $return_value, $product )
       	{
       	// Remove only if Cards category and is not on single product page (removes from shop, home, categories, etc)
       	if ( has_term( 'Cards', 'product_cat' ) AND !is_product() ) {
       			return false; //will replace badd to cart to "rad more" linking to single product page
       	}
   
       return $return_value;
       }
   
       //replace text on "Add to cart button" to "Customize"
       add_filter( 'woocommerce_product_add_to_cart_text', 'custom_replace_read_more' );
   
       function custom_replace_read_more( $text ) {
          global $product;       
       //    if ( $product && ! $product->is_in_stock() ) {  
         if ( has_term( 'Cards', 'product_cat' ) ) {         
             return 'Customize';
          } 
          return $text;
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[J Cart Upsell and Cross-sell for WooCommerce] Take customer to product page on ADD](https://wordpress.org/support/topic/take-customer-to-product-page-on-add/)
 *  Thread Starter [srlimon](https://wordpress.org/support/users/srlimon/)
 * (@srlimon)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/take-customer-to-product-page-on-add/#post-15804275)
 * ohh 🙁
    This plugin covered almost all my needs. I’ll still research on how I
   could implement it to my needs and purchase the paid version.
 * Please consider this a feature on future development, as one might need for variable
   products, even on your demo website, to take customer to product page and “custom
   to add”
    Brownie points if this can be configurable by each upsell.

Viewing 6 replies - 1 through 6 (of 6 total)