You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get all attribute taxonomies for my plugin using the wc_get_attribute_taxonomies function which is declared in woocommerce/includes/wc-attribute-functions.php, however, when I call the function, I get the following error:
Fatal error: Cannot redeclare wc_attributes_array_filter_variation() (previously declared in /home/roy/www/wcconnector/web/wp-content/plugins/woocommerce/includes/wc-attribute-functions.php:321) in /home/roy/www/wcconnector/web/wp-content/plugins/woocommerce/includes/wc-attribute-functions.php on line 321
Secure connection (HTTPS): ❌Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
Hide errors from visitors: ✔
Active Plugins (4)
Test Payment Module for Woocommerce: by Sean Barton (Tortoise IT) – 1.5
Active Ants WooCommerce Connector: by Active Ants B.V. – 1.0.0
WooCommerce: by Automattic – 3.0.1
WordPress Importer: by wordpressdotorg – 0.6.3
Settings
API Enabled: ✔
Force SSL: –
Currency: EUR (€)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)
Name: Shapely
Version: 1.1.2
Author URL: https://colorlib.com/
Child Theme: ❌ – If you're modifying WooCommerce on a parent theme you didn't build personally
then we recommend using a child theme. See: How to create a child theme
WooCommerce Support: ❌ Not declared
Templates
Overrides: –
ADDITIONAL NOTES
I can currently work around this issue by copying the code from the wc_get_attribute_taxonomies function.
The text was updated successfully, but these errors were encountered:
royvanos
changed the title
Cannot use the wc_get_attribute_taxonomies function after including it
[3.0.*]Cannot use the wc_get_attribute_taxonomies function after including it
Apr 10, 2017
royvanos
changed the title
[3.0.*]Cannot use the wc_get_attribute_taxonomies function after including it
[WC 3.0.*] Cannot use the wc_get_attribute_taxonomies function after including it
Apr 10, 2017
royvanos
changed the title
[WC 3.0.*] Cannot use the wc_get_attribute_taxonomies function after including it
[3.0.*] Cannot use the wc_get_attribute_taxonomies function after including it
Apr 10, 2017
Do not include the file. That will mean you include it and then WC includes it later. This is a problem in your code. Run it later (after init) once the files are included.
EXPLANATION OF THE ISSUE
I'm trying to get all attribute taxonomies for my plugin using the wc_get_attribute_taxonomies function which is declared in woocommerce/includes/wc-attribute-functions.php, however, when I call the function, I get the following error:
Fatal error: Cannot redeclare wc_attributes_array_filter_variation() (previously declared in /home/roy/www/wcconnector/web/wp-content/plugins/woocommerce/includes/wc-attribute-functions.php:321) in /home/roy/www/wcconnector/web/wp-content/plugins/woocommerce/includes/wc-attribute-functions.php on line 321
STEPS TO REPRODUCE THE ISSUE
SYSTEM STATUS
WordPress Environment
Home URL: http://wcconnector.local
Site URL: http://wcconnector.local
WC Version: 3.0.1
Log Directory Writable: ✔
WP Version: 4.8-alpha-40387
WP Multisite: –
WP Memory Limit: 8 GB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
Server Environment
Server Info: Apache/2.4.18 (Ubuntu)
PHP Version: 7.0.12-1+deb.sury.org~xenial+1
PHP Post Max Size: 2 GB
PHP Time Limit: 0
PHP Max Input Vars: 1000
cURL Version: 7.47.0
OpenSSL/1.0.2g
SUHOSIN Installed: –
MySQL Version: 5.7.11
Max Upload Size: 2 GB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔
Database
WC Database Version: 3.0.1
WC Database Prefix: aawcc_
woocommerce_sessions: ✔
woocommerce_api_keys: ✔
woocommerce_attribute_taxonomies: ✔
woocommerce_downloadable_product_permissions: ✔
woocommerce_order_items: ✔
woocommerce_order_itemmeta: ✔
woocommerce_tax_rates: ✔
woocommerce_tax_rate_locations: ✔
woocommerce_shipping_zones: ✔
woocommerce_shipping_zone_locations: ✔
woocommerce_shipping_zone_methods: ✔
woocommerce_payment_tokens: ✔
woocommerce_payment_tokenmeta: ✔
MaxMind GeoIP Database: ✔
Security
Secure connection (HTTPS): ❌Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
Hide errors from visitors: ✔
Active Plugins (4)
Test Payment Module for Woocommerce: by Sean Barton (Tortoise IT) – 1.5
Active Ants WooCommerce Connector: by Active Ants B.V. – 1.0.0
WooCommerce: by Automattic – 3.0.1
WordPress Importer: by wordpressdotorg – 0.6.3
Settings
API Enabled: ✔
Force SSL: –
Currency: EUR (€)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)
WC Pages
Shop base: #13 - /shop/
Cart: #14 - /cart/
Checkout: #15 - /checkout/
My account: #16 - /my-account/
Theme
Name: Shapely
Version: 1.1.2
Author URL: https://colorlib.com/
Child Theme: ❌ – If you're modifying WooCommerce on a parent theme you didn't build personally
then we recommend using a child theme. See: How to create a child theme
WooCommerce Support: ❌ Not declared
Templates
Overrides: –
ADDITIONAL NOTES
I can currently work around this issue by copying the code from the wc_get_attribute_taxonomies function.
The text was updated successfully, but these errors were encountered: