• Hi all,

    Not a huge issue, but I had to rollback to an earlier version of this plugin for it to work with the “Name Your Price” WC premium plugin. The most recent version of this plugin cause the price field not to carry through to the cart/checkout pages. After isolating the theme and other plugins, this plugin was the culprit.

    I rolled back to an earlier version, however, and everything is working as it should.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi, I’m the author of Name Your Price and without digging too deeply, I’d guess that the problem stems from

    
                	$_product = $citem["variation_id"] == 0 ? wc_get_product( $citem["product_id"] ) : wc_get_product( $citem["variation_id"] );
                	/* Get the original price */
                	if ( method_exists ( $_product, "get_price" ) ) {
                		/* Woocommerce 3.0.6 + */
                		$orgPrice = $_product->get_price ();
                	} else {
                		/* Woocommerece before 3.0.6 */
                		$orgPrice = floatval ( $_product->price );
                	}
    

    in the handle_custom_pricing() method of the wcff-negotiator.php file. By restoring the product’s original price you undo any cart run-time price changes such as those handled by name your price.

    The data key of a cart item is the current product instance, so I think $citem['data']->get_price() should get the price of the product as it is in the cart.

    I hope that helps. Let me know if you have any questions about NYP.

    Any chance that someone could implement a working fix for this, please?

    We have quite few websites that use the combination of the 2 plugins.

    Sticking with 2.0.5 for now.

    EDIT:
    As far as I see this is about conflict with WC Name your Price premium plugin, in our case it’s with https://wordpress.org/plugins/yith-woocommerce-name-your-price/. So guessing it will conflict with any plugins of this sort.

    • This reply was modified 6 years, 2 months ago by Kramarz.

    Any statement from plugin author, please? 🙂

    Based on my findings in the snippet above, this is going to conflict with any and all plugins that do front-end manipulations of the price in the cart. If you need Name Your Price plus custom fields and it is urgent for your business, my suggestion is to use the WooCommerce.com Product Add-ons which has known compatibility with Name Your Price.

    Not sure if this helps, but I have implemented cart price overrides using

    add_action( 'woocommerce_before_calculate_totals', 'override_custom_giftcard_price', 1000, 1 );

    Note that I needed to use a priority of 1000 with WC-Fields-Factory 2.0.6. If you recursively grep the WC-Fields-Factory plugin directory, you’ll see that some of Sark’s priorities are 999 and I’m guessing that cart price changes need to happen AFTER these other actions.

    Same problem with Potent Donations for WooCommerce. Does anyone have the v2.0.5 I can use for now?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Confilct With “Name Your Price” WC Plugin’ is closed to new replies.