Shipping By Rules for WooCommerce

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!



The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1


Syntax Errors 17 Oct 2016 22:30 #1

  • Customer
  • Customer's Avatar Topic Author
Hello, a function containing a syntax appears to always evaluate to true, e.g.:

Weight>50; Weight<=100; afasdasdfasdfa; Articles<=1; Shipping=14.52

Please advise.

Thank you.

Syntax Errors 18 Oct 2016 01:28 #2

Dear Customer,
You are right, "afasdasdfasdfa" is not detected by the plugin as a condition. To make sure that the plugin understands it as a condition, prefix it with "Condition=".
The reason is that internally, any unknown variable evaluates to 0 (which also happens to be the value for FALSE), so basically, your rule is evaluated as

Weight>50; Weight<=100; 0; Articles<=1; Shipping=14.52

The plugin by default understands the 0 as shipping costs, which is then overridden with the other shipping cost 14.52. THis is an unfortunate side effect of the fact that (1) rule parts can be given in arbitrary order, i.e. the shipping cost can also be given first with the name and/or conditions following, and (2) a number without any prefix is understood as shipping costs (i.e. the Shipping= prefix can be left out)

Best regards,
  • Page:
  • 1