Commit Graph

21 Commits

Author SHA1 Message Date
Brent Shepherd 9247e3277c Create WC standards compliant class name from term 2013-02-28 15:39:02 +10:00
Brent Shepherd 2eb8b26aad Use sanitized $product_type->name values
product_type term slugs are inconsistent so can not be used as unique
identifiers, but product_type term names may have white space and other
characters unsafe for option values, class names & or hooks, therefore,
product_type term names should be sanitized.
2013-02-28 15:39:02 +10:00
Mike Jolley 80b4ef14c9 Slugs are unreliable, and support show_if hide_if for all product types 2013-02-26 15:14:49 +00:00
Brent Shepherd 102cbe78b0 Make slug elements ucfirst for class name
For example, instead of `WC_Product_Variable_subscription` create the
class name `WC_Product_Variable_Subscription`.
2013-02-21 16:32:20 +10:00
Brent Shepherd 4ceb988536 Use product_type slug not sanitized term name 2013-02-21 15:13:23 +10:00
Mike Jolley f5f01c497e Changes for API Docs 2013-02-20 17:14:51 +00:00
Mike Jolley 8f43d9cf8b If a product type does not exist, default to SIMPLE Closes #2360. 2013-02-05 11:28:28 +00:00
Coen Jacobs 24b2c47077 Support for non-product post types in WC_Product_Factory #2199 2013-01-10 12:46:39 +01:00
Yakir Sitbon 876d4c1023 Change phpDoc @return in Fantory class. 2012-12-06 19:15:18 +02:00
Mike Jolley 0da50add7b Fix link variations on new posts. Closes #1925. 2012-12-05 17:57:53 +00:00
Coen Jacobs 37feabd87f WooCommerce 2.0 is coming! 2012-12-03 20:19:58 +01:00
Mike Jolley 786003ecb4 prevent notices 2012-12-03 12:41:05 +00:00
Mike Jolley 3c66ddae42 Class tweaks, need more testing. Closes #1874. 2012-11-29 16:48:40 +00:00
Mike Jolley b1ec4b289a Nuked whitespace. Closes #1846. 2012-11-27 16:22:47 +00:00
Matt eddbf11e13 ucfirst() on the $product_type when instantiating WC_Product_x 2012-11-27 10:31:07 -05:00
Mike Jolley ddbfd2bd28 Factory tweak 2012-11-26 13:39:12 +00:00
Coen Jacobs fccbb18fb4 Check for empty terms array before current(). Closes #1807 2012-11-23 13:39:01 +01:00
Coen Jacobs 554c73f05b Fixed missing $args attribute in class construction 2012-11-22 15:13:34 +01:00
Coen Jacobs 85f55e5ee8 Set the product type to 'variation' if post type is like that
Because variation post types do not have a product type
2012-11-22 13:56:52 +01:00
Coen Jacobs 098e2d5d4d Reinstated post_type to be used as a class parameter 2012-11-22 12:40:42 +01:00
Coen Jacobs b2a868301c Simplified version of Product Factory using an args array 2012-11-22 12:37:41 +01:00