Claudio Sanches
fe8b0d0fbe
Merge pull request #8698 from thenbrent/update_product_type
...
Save product type before saving variations
2015-07-31 16:33:12 -03:00
Brent Shepherd
501f0b752f
Save product type before saving variations
...
WooCommerce prior to WC 2.4 saved the product type before any variations were saved because
WC_Meta_Box_Product_Data::save_variations() was called by WC_Meta_Box_Product_Data::save().
However, in WC 2.4 the variations are saved independently of other data about the containing
variable product, including product type. Because the product type hasn't been saved yet,
extensions that need to save their own variation level meta data can't know when saving
variations if the product is of the type they want to act on. They also can't check `$_POST`
to find out when saving variations, because 'product-type' isn't passed to that as it's
variable level meta data, not variation level meta data.
This patch passes the product type along with the variation level meta data when saving variations.
It then uses that to save the product type if the variable product has not yet been saved (and
therefore the product type has never been stored, which means calling get_product() would instantiate
a 'simple' product, as that is the default product type). This can lead to fatal errors if callbacks
expect the product type to be variable and attempt to call methods that only exist on those product
types, like variable_product_sync().
It will also update the product type if it was previously saved but has since changed. This prevents
fatal errors like that mentioned above but caused by switching from one product type, like a simple
product, to another, like a variable product.
2015-07-31 11:42:21 -07:00
JeroenSormani
2c81a71f04
Define DOING_AJAX early
2015-07-31 20:15:17 +02:00
Claudio Sanches
0e70aed254
POT
2015-07-31 13:20:56 -03:00
Mike Jolley
e7dfff8687
Update wording and add tooltip
...
#8690
2015-07-31 17:14:28 +01:00
Nicola Mustone
4f13387881
Merge branch 'master' of github.com:woothemes/woocommerce
2015-07-31 17:15:13 +02:00
Mike Jolley
61cb48afd7
Tweak wc ajax to post to the CURRENT URL rather than a fixed endpoint
2015-07-31 12:56:27 +01:00
Mike Jolley
67788f971d
Merge pull request #8696 from franticpsyx/animate-variations-changes
...
[2.4] Animate variations script DOM modifications
2015-07-31 12:44:18 +01:00
Mike Jolley
82f50cedb0
Allow menu_order sorting like in 2.3
...
Also allow setting manually to allow sorting between pages.
Fixes #8690
2015-07-31 12:39:23 +01:00
Manos Psychogyiopoulos
f5691fd82a
animate variations script markup changes
2015-07-31 14:04:55 +03:00
Mike Jolley
763c7dde35
Fix product image size saving
...
Fixes #8695
2015-07-31 11:29:04 +01:00
Claudio Sanches
a314726c3c
2.4.0-RC1
2015-07-30 21:54:35 -03:00
Claudio Sanches
a215c4ed3c
[API] Fixed variation without parent for v2
2015-07-30 21:53:00 -03:00
Claudio Sanches
a42b25ec4e
Merge pull request #8692 from Nils-Fredrik/master
...
Fix for #8691 : Variation without parent will not cause 500.
2015-07-30 21:51:13 -03:00
Claudio Sanches
6c4893e0b2
Introduces the woocommerce_ajax_admin_get_variations_args filter, closes #8690
2015-07-30 19:11:53 -03:00
nils-fredrik@maksimer.no
f4db67bcbc
Fix for #8691 : Variation without parent will not cause 500.
2015-07-30 23:32:24 +02:00
Claudio Sanches
09145181e5
[API] Removed deprecated products/sku endpoint
2015-07-30 17:35:14 -03:00
Claudio Sanches
002b5df763
Merge branch 'master' of github.com:woothemes/woocommerce
2015-07-30 15:07:52 -03:00
Claudio Sanches
0361a10e26
Removed instances of WC_Order in favor to wc_get_order(), closes #8689
2015-07-30 15:07:34 -03:00
Mike Jolley
64d38f6dd8
STOCK STATUS field for variations should never be hidden
...
Fixes #8687
2015-07-30 15:45:05 +01:00
Mike Jolley
5d8d8c0518
fix dummy data
2015-07-30 15:12:14 +01:00
Mike Jolley
622dc777f0
Correct number format in coupon total
2015-07-30 12:52:52 +01:00
Claudio Sanches
b28c6db7f5
Added button to dismiss variation error notices
2015-07-29 19:56:33 -03:00
Claudio Sanches
d0e34588aa
Updated all .page-selector when change page, closes #8681
2015-07-29 19:25:17 -03:00
Claudio Sanches
8780f2c1ef
Fixed chmod to jquery-serializejson
2015-07-29 19:16:27 -03:00
Claudio Sanches
be3dcf5ddf
Fixed cursor for variations, removed move and changed to pointer
2015-07-29 11:52:12 -03:00
Nicola Mustone
04d7e10982
Merge branch 'master' of github.com:woothemes/woocommerce
2015-07-29 15:03:10 +02:00
Mike Jolley
7b2aec4791
Take item qty into consideration when refunding orders
...
Fixes #8675
2015-07-29 13:13:41 +01:00
Mike Jolley
b0ee9a8cc6
Handle text vs select attribute names vs slugs
2015-07-29 10:58:28 +01:00
Claudio Sanches
75eaaece5f
Fixed coveralls badge
2015-07-28 13:10:45 -03:00
Claudio Sanches
7d4a531703
Fixed tests for variable products
2015-07-28 13:07:48 -03:00
Claudio Sanches
ef5f41d748
Fixed textdomain for api key last access unknown, closes #8672
2015-07-28 12:44:20 -03:00
Claudio Sanches
11f4956012
Merge branch 'master' of github.com:woothemes/woocommerce
2015-07-28 12:43:25 -03:00
Mike Jolley
e3ff9d6e24
Minify
2015-07-28 16:22:00 +01:00
Mike Jolley
0c12a36911
Merge pull request #8671 from franticpsyx/allow-product-variations-data-js-reload
...
[2.4] Variations script: Allow product variations data to be dynamically refreshed
2015-07-28 16:21:29 +01:00
Mike Jolley
060fb16e2e
Move Pre 2.4 handling for attributes - DRY
...
@claudiosmweb @franticpsyx
2015-07-28 16:20:51 +01:00
Mike Jolley
6626c68175
When syncing OLD products, update the attributes to 2.4 standard
2015-07-28 15:13:25 +01:00
Manos Psychogyiopoulos
dae10a962c
allow product variations data refresh
2015-07-28 15:34:04 +03:00
Mike Jolley
f19ba7a755
Send line item when no name is set
...
Closes #8666
2015-07-28 11:41:37 +01:00
Mike Jolley
eb19532165
Show 'fee' label is empty
2015-07-28 11:32:53 +01:00
Mike Jolley
e4a8602490
filter: woocommerce_widget_cart_is_hidden
...
Closes #8670
2015-07-28 11:06:31 +01:00
Mike Jolley
1b45bcde0b
URL encode to preserve text attributes in permalinks
2015-07-28 10:37:24 +01:00
Mike Jolley
808c01cb90
Added woocommerce_single_variation hook for variation data and cart button to reduce code in template file and used hooks. @claudiosmweb
...
Removed woocommerce_before_variations_button @Ninos. Use
woocommerce_single_variation
2015-07-28 10:32:28 +01:00
Claudio Sanches
2c12c3de24
2.4.0-beta-4
2015-07-27 18:55:08 -03:00
Claudio Sanches
1c8f123f1e
Merge pull request #8665 from WordCommerce/patch-1
...
[2.4] Removed API status notification on the Settings
2015-07-27 18:38:56 -03:00
WordCommerce
19205ec0e6
[2.4] Removed API status notification on the Settings
2015-07-27 23:59:08 +03:00
Claudio Sanches
1b75ad21bb
Merge branch 'master' of github.com:woothemes/woocommerce
2015-07-27 16:14:52 -03:00
Claudio Sanches
30f9d81916
Fixed row actions to support WordPress 4.3, closes #8578
2015-07-27 16:14:41 -03:00
Mike Jolley
890bcff302
Fix cart ajax endpoint
...
@claudiosmweb @BFTrick
2015-07-27 20:02:40 +01:00
Claudio Sanches
6a62b63813
POT
2015-07-27 15:08:56 -03:00