WooCommerce - WooSquare Plus 插件 - 加上产品变体必须是一个数组 [英] WooCommerce - WooSquare Plus plugin - plus product variations must be an array

查看:45
本文介绍了WooCommerce - WooSquare Plus 插件 - 加上产品变体必须是一个数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WooSquare 插件无法在 WooCommerce 和 Square 之间同步产品.

WooSquare plugin failed to synchronize products between WooCommerce and Square.

推荐答案

我查看了 WordPress 数据库中 xxxx_woo_square_integration_logs 表的内容.其中一个日志条目说 - 变体必须是一个数组".我简要地查看了我认为正在执行同步的程序 WooToSquareSynchronizer.php,它有一个声明:

I had a look at the contents of the xxxx_woo_square_integration_logs table in the WordPress database. One of the log entries said - "variations must be an array". I had a brief look at the program that I thought was performing the synchronization, WooToSquareSynchronizer.php and it had a statement:

$product_variations = unserialize($productDetails['_product_attributes'][0]);

尽管变体在 WooCommerce 中具有另一种含义,但代码似乎表明我们在这里谈论的是产品属性.我猜想代码期望每个产品至少有一个属性.我添加了一个全局属性,然后在我的每个产品上设置它.我的产品随后成功同步.请注意,此故障仅在创建产品时发生,而不是在更新产品时发生.查看 WooSquare plus 文档,产品变体看起来可以通过属性进行管理,但就我而言,我没有使用产品变体.

Despite variations having another meaning in WooCommerce, the code appears to suggest what we are talking about here is product attributes. I guessed that the code expects at least one attribute for each product. I added a single global attribute and then set that on each of my products. My products were then successfully synchronized. Note that this failure only occurred when creating products, not when updating products. Looking at the WooSquare plus documentation, product variations looked to managed with attributes but in my case, I was not using product variations.

附言有1500声望的可以加个WooSquare plus"作为标签吗?

P.S. Could someone with 1500 reputation please add "WooSquare plus" as a tag?

参考文献:

https://apiexperts.io/documentation/woosquare-plus/(不是与 WooSquare Pro 混淆!).

https://apiexperts.io/documentation/woosquare-plus/ (NOT TO BE CONFUSED WITH WooSquare Pro!).

https://apiexperts.io/fast-support/

这可能是免费版本 - https://wordpress.org/support/plugin/woosquare/reviews/ - https://apiexperts.io/documentation/woosquare/

This is probably the free version - https://wordpress.org/support/plugin/woosquare/reviews/ - https://apiexperts.io/documentation/woosquare/

这篇关于WooCommerce - WooSquare Plus 插件 - 加上产品变体必须是一个数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆