Commit Graph

5910 Commits

Author SHA1 Message Date
Mike Jolley bc6fedd000 Space missing 2015-11-13 21:20:30 +00:00
Mike Jolley 3082c5bba6 wc_related_ and get_related method tweaks
Remove use of multiple expiring transients. See function docblock for
explanation.
2015-11-13 21:14:42 +00:00
Mike Jolley 18e98d8b20 Store shipping rates in session
Rather than use a session which is independent of customer sessions,
store the rates in the session itself to avoid multiple transients.
2015-11-13 20:53:44 +00:00
Mike Jolley 3ceed757bd Store rating and reviews in postmeta rather than transients
These don’t change often, and as long as we listen for comment count
update events will be kept in sync.
2015-11-13 20:41:20 +00:00
Mike Jolley 70d9f58811 Version not needed for wc_var_prices
This transient doesn’t need to expire often because the hashes will be
unique if taxes change.

This change means a variable product will only use 1 transient rather
than many.
2015-11-13 20:01:42 +00:00
roykho e5ca21f1e3 Change to WP convenience function 2015-11-12 13:19:57 -08:00
roykho 5cd3150c94 Fix order item name escaping apostrophe closes #9583 2015-11-12 08:04:21 -08:00
Claudio Sanches bb24369119 Merge pull request #9582 from shivapoudel/currency-symbol
Fixed rupee sign for currency in product data sale and regular price
2015-11-12 10:23:00 -02:00
Shiva Poudel 853530cece Fixed rupee sign for currency in product data sale and regular price 2015-11-12 03:00:54 +05:45
Fredrik Forsmo 3440985a8a Check so `product_base` exists before using it
`product_base` index in `$permalinks` array in `prepend_shop_page` method don't always exists for a new WooCommerce site, doing a isset check before will solve `Notice: Undefined index: product_base` error.
2015-11-11 19:44:23 +01:00
Claudio Sanches 84ac454c3e Fixed settings messages location in WP 4.4, closes #9575 2015-11-11 12:18:31 -02:00
Claudio Sanches 555ef9abdf Merge pull request #9573 from shivapoudel/shipping-class-fix
Shipping class fix
2015-11-11 11:30:07 -02:00
Shiva Poudel 3a52125b93 Updated admin menu docblock version 2015-11-11 18:29:00 +05:45
Shiva Poudel c0c587103c Fix - Shipping classes menu highlight, Closes #9538 2015-11-11 15:12:31 +05:45
Shiva Poudel d92dcfaba0 Fix - Shipping classes admin page access, #9538 2015-11-11 15:07:43 +05:45
Claudio Sanches 57feb4ba9b [API] Added woocommerce_api_uploaded_image_from_url action, closes #9568 2015-11-10 22:59:17 -02:00
Claudio Sanches 357254f928 Merge pull request #9567 from shivapoudel/rupee-sign
Rs. currency symbol can use rupee sign html entity
2015-11-10 22:50:34 -02:00
Claudio Sanches e1bb5830c8 Merge pull request #9569 from shivapoudel/param
Tweak missing fallback param in geolocate_ip
2015-11-10 22:47:09 -02:00
Shiva Poudel 70496e5864 Tweak missing fallback param in geolocate_ip 2015-11-11 06:19:01 +05:45
Claudio Sanches ebfe703d62 Merge pull request #9564 from shivapoudel/unused
Remove unused variable declaration
2015-11-10 19:16:50 -02:00
Shiva Poudel 6a268f003f Rs. currency symbol can use rupee sign html entity
@see http://www.w3schools.com/charsets/ref_utf_currency.asp
2015-11-11 01:12:48 +05:45
Maxwell Morgan da6eeebf81 Update class-wc-countries.php
Typo on ether -> either
2015-11-10 11:51:26 -05:00
Claudio Sanches 976f83c5be Merge pull request #9555 from shivapoudel/minor-change
Improve docblock and coding standard
2015-11-10 12:49:15 -02:00
Shiva Poudel d31859ab6c Remove unused variable declaration 2015-11-10 16:53:45 +05:45
Shiva Poudel f45d367d9f Tweak docblocks in GeoIP class 2015-11-10 16:30:36 +05:45
Shiva Poudel 47489fb800 Use of single quotes 2015-11-10 16:10:19 +05:45
Ibrahim e2903ef450 Added rupee symbol for INR
The rupee symbol (http://www.fileformat.info/info/unicode/char/20b9/index.htm) has been adopted since 2010
2015-11-10 13:26:18 +05:30
Shiva Poudel 33ad23f371 Improve help tip docblock and remove space 2015-11-10 07:13:53 +05:45
Claudio Sanches 9a926aef4f Updated wc_checkout_is_https() docblock 2015-11-09 23:08:10 -02:00
Claudio Sanches c471a47910 Improved WC_Geo_IP logger
Removed not useful "GeoIP API: fseek failed" log messages
2015-11-09 22:58:22 -02:00
Claudio Sanches 1512d448c1 Removed name param from SimplifyCommerce.generateToken 2015-11-09 22:49:53 -02:00
Claudio Sanches 3959d4fe3e Merge pull request #9553 from woothemes/issue/simplify-commerce-address-fields
Fix - address fields were not properly being passed to Simplify via t…
2015-11-09 22:43:11 -02:00
roykho 84436f4a11 Fix hosted payments address fields were not passing to simplify 2015-11-09 16:37:55 -08:00
Claudio Sanches 770f6793fc Check if WC_Logger exists before try to use in WC_Geo_IP class 2015-11-09 22:08:22 -02:00
Claudio Sanches 98abbf0184 Fixed fseek check in WC_Geo_IP class 2015-11-09 22:03:22 -02:00
roykho b49b0b0133 Fix - address fields were not properly being passed to Simplify via token 2015-11-09 15:36:52 -08:00
David Anderson b022769c2a Prevent PHP notice
Prevents this PHP notice (on my localhost/testing setup):

PHP Notice:  Undefined offset: -16776960 in wp
-content/plugins/woocommerce/includes/class-wc-geo-ip.php on line 1608

Note that the geoip_country_code_by_addr() method, a few lines further down, already makes a similar check to this one which is being added for IPv6.
2015-11-09 12:17:55 +00:00
Claudio Sanches 89de396709 [2.4] Allow bulk edit sale_prices as 0 2015-11-06 14:42:51 -02:00
Nicola Mustone c9da4f928a check if ABSPATH is defined 2015-11-06 10:22:19 +01:00
Claudio Sanches 9adb04d612 [CLI] Created command to update tax rate 2015-11-06 02:50:07 -02:00
Claudio Sanches 394342c287 [API] Fixed action and removed transient functions from taxes PUT endpoint 2015-11-06 02:44:02 -02:00
Claudio Sanches 74d1492fe7 [CLI] Created command to get tax rate 2015-11-06 02:31:58 -02:00
Claudio Sanches 1b54117a8b [API] Created commands to delete tax rates and tax classes and fixed the list_class command name 2015-11-06 02:19:47 -02:00
Claudio Sanches 18cf62ed66 [API] Created commands to create tax rates and tax classes 2015-11-06 01:58:08 -02:00
Claudio Sanches 647a2e7498 [API] Created commands to list tax rates and tax classes 2015-11-06 01:37:57 -02:00
Claudio Sanches ef7046ea76 [CLI] Created initial tax command class 2015-11-06 00:23:46 -02:00
Claudio Sanches af89582251 Merge pull request #9526 from shivapoudel/nepal-data
Update Nepali Districts with Zones
2015-11-05 19:42:40 -02:00
Mike Jolley d0b7335e33 Merge pull request #9528 from shivapoudel/typo
Typo fix in tools for uninstall
2015-11-05 19:10:47 +00:00
Shiva Poudel 592c7aee02 Typo fix in tools for uninstall 2015-11-06 00:10:14 +05:45
Shiva Poudel 8300192bf7 Zone and postal code updated 2015-11-05 23:25:30 +05:45
Shiva Poudel a1550fab77 Updated Nepal local settings 2015-11-05 23:06:15 +05:45
Scrutinizer Auto-Fixer 08efaf84df Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-11-05 16:05:03 +00:00
Mike Jolley 4f0cc137cc Enable SQL_BIG_SELECTS in reports
@claudiosmweb
2015-11-05 15:45:19 +00:00
Mike Jolley 4e5baf23aa Cache get_item_meta_array for better performance
Closes #8810 @claudiosmweb
2015-11-05 15:21:28 +00:00
Mike Jolley cb0e61bd4e Set prefix_num first time 2015-11-05 15:21:06 +00:00
Mike Jolley 5e62143767 Update tools text Closes #9512 2015-11-05 14:44:05 +00:00
James Collins 45972cf92b Fix duplicate key errors during db upgrade/install
Running phpunit tests currently outputs the following errors/warnings:

WordPress database error Duplicate key name 'session_id' for query ALTER TABLE wptests_woocommerce_sessions ADD UNIQUE KEY  session_id (session_id) made by PHPUnit_TextUI_Command::main, PHPUnit_TextUI_Command->run, PHPUnit_TextUI_Command->handleArguments, PHPUnit_TextUI_Command->handleBootstrap, PHPUnit_Util_Fileloader::checkAndLoad, PHPUnit_Util_Fileloader::load, include_once('/srv/www/woocommerce/htdocs/wp-content/plugins/woocommerce/tests/bootstrap.php'), WC_Unit_Tests_Bootstrap::instance, WC_Unit_Tests_Bootstrap->__construct, require_once('/srv/www/wordpress-develop/tests/phpunit/includes/bootstrap.php'), require_once('wp-settings.php'), do_action('setup_theme'), call_user_func_array, WC_Unit_Tests_Bootstrap->install_wc, WC_Install::install, WC_Install::create_tables, dbDelta
WordPress database error Multiple primary key defined for query ALTER TABLE wptests_woocommerce_sessions ADD PRIMARY KEY  session_key (session_key) made by PHPUnit_TextUI_Command::main, PHPUnit_TextUI_Command->run, PHPUnit_TextUI_Command->handleArguments, PHPUnit_TextUI_Command->handleBootstrap, PHPUnit_Util_Fileloader::checkAndLoad, PHPUnit_Util_Fileloader::load, include_once('/srv/www/woocommerce/htdocs/wp-content/plugins/woocommerce/tests/bootstrap.php'), WC_Unit_Tests_Bootstrap::instance, WC_Unit_Tests_Bootstrap->__construct, require_once('/srv/www/wordpress-develop/tests/phpunit/includes/bootstrap.php'), require_once('wp-settings.php'), do_action('setup_theme'), call_user_func_array, WC_Unit_Tests_Bootstrap->install_wc, WC_Install::install, WC_Install::create_tables, dbDelta

WordPress database error Duplicate key name 'session_id' for query ALTER TABLE wptests_woocommerce_sessions ADD UNIQUE KEY  session_id (session_id) made by PHPUnit_TextUI_Command::main, PHPUnit_TextUI_Command->run, PHPUnit_TextUI_TestRunner->doRun, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestCase->run, PHPUnit_Framework_TestResult->run, PHPUnit_Framework_TestCase->runBare, PHPUnit_Framework_TestCase->runTest, ReflectionMethod->invokeArgs, WooCommerce\Tests\Util\WC_Tests_Install->test_check_version, WC_Install::check_version, WC_Install::install, WC_Install::create_tables, dbDelta
WordPress database error Multiple primary key defined for query ALTER TABLE wptests_woocommerce_sessions ADD PRIMARY KEY  session_key (session_key) made by PHPUnit_TextUI_Command::main, PHPUnit_TextUI_Command->run, PHPUnit_TextUI_TestRunner->doRun, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestCase->run, PHPUnit_Framework_TestResult->run, PHPUnit_Framework_TestCase->runBare, PHPUnit_Framework_TestCase->runTest, ReflectionMethod->invokeArgs, WooCommerce\Tests\Util\WC_Tests_Install->test_check_version, WC_Install::check_version, WC_Install::install, WC_Install::create_tables, dbDelta
.WordPress database error Duplicate key name 'session_id' for query ALTER TABLE wptests_woocommerce_sessions ADD UNIQUE KEY  session_id (session_id) made by PHPUnit_TextUI_Command::main, PHPUnit_TextUI_Command->run, PHPUnit_TextUI_TestRunner->doRun, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestCase->run, PHPUnit_Framework_TestResult->run, PHPUnit_Framework_TestCase->runBare, PHPUnit_Framework_TestCase->runTest, ReflectionMethod->invokeArgs, WooCommerce\Tests\Util\WC_Tests_Install->test_install, WC_Install::install, WC_Install::create_tables, dbDelta
WordPress database error Multiple primary key defined for query ALTER TABLE wptests_woocommerce_sessions ADD PRIMARY KEY  session_key (session_key) made by PHPUnit_TextUI_Command::main, PHPUnit_TextUI_Command->run, PHPUnit_TextUI_TestRunner->doRun, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestCase->run, PHPUnit_Framework_TestResult->run, PHPUnit_Framework_TestCase->runBare, PHPUnit_Framework_TestCase->runTest, ReflectionMethod->invokeArgs, WooCommerce\Tests\Util\WC_Tests_Install->test_install, WC_Install::install, WC_Install::create_tables, dbDelta

dbDelta requires very specific syntax (as per http://codex.wordpress.org/Creating_Tables_with_Plugins).
2015-11-05 13:43:56 +08:00
Mike Jolley 61e746730f wc_transaction_query function
Only uses transactions if enabled, or read uncommitted is supported
#9279
2015-11-04 14:11:40 +00:00
Mike Jolley 48f8665e2d Hide SQL errors during ajax requests
Avoids invalid JSON
2015-11-04 13:35:32 +00:00
Mike Jolley 7eb45ba16f Added wc_array_cartesian function to generate variations in a logical order.
Fixes #9515 @claudiosmweb
2015-11-04 12:14:51 +00:00
Claudio Sanches e1c2054b5c Improved how geolocation js check for pages where shouldn't load
Simplified all checks in just one
Less PHP and JS conditionals

cc @mikejolley
2015-11-04 01:51:54 -02:00
Claudio Sanches fde904b27a [2.4] Fixed redirection loop on customizer screen
It's caused an redirection loop on the customizer page when
activated "Geolocate (with page caching support)" option

cc @mikejolley
2015-11-04 01:20:16 -02:00
Claudio Sanches 58468d8821 [CLI] Fixed sanitization for product attributes 2015-11-03 17:11:54 -02:00
Shiva Poudel d9e8057df3 Tweak the dockblocks and periodic-ending fix 2015-11-04 00:05:08 +05:45
Mike Jolley 1756aa8fca Use help tip function in email table. 2015-11-03 16:12:13 +00:00
Mike Jolley 1b38f380af Merge remote-tracking branch 'origin/master'
Conflicts:
	includes/emails/class-wc-email.php
2015-11-03 16:09:01 +00:00
Claudio Sanches 439141bbe3 Fixed undefined error on WC_Geo_IP 2015-11-03 13:55:26 -02:00
Mike Jolley 1e945026b3 Tweak screen description 2015-11-03 15:41:31 +00:00
Mike Jolley 8457dbb57d Display if emails are manually sent 2015-11-03 15:40:10 +00:00
Mike Jolley d95f863d79 Show descriptions inline 2015-11-03 15:04:29 +00:00
Mike Jolley 52553968c5 Use desc_tip for emails 2015-11-03 14:59:48 +00:00
Mike Jolley 3c6a870335 Email class tidyup 2015-11-03 14:57:39 +00:00
Claudio Sanches c6ab828aa1 [2.4] Improved error handling in WC_Geo_IP
Implemented our log system to register in background any errors

Closes #9501
2015-11-03 12:30:33 -02:00
Claudio Sanches 5893875b0c Removed period for file headers 2015-11-03 11:53:50 -02:00
Claudio Sanches ee30b5b308 Fixed php docs standards 2015-11-03 11:31:20 -02:00
Claudio Sanches efa19f799d Fixed some coding standards for docblocks 2015-11-03 10:28:01 -02:00
Mike Jolley 5f65494e27 Restructure emails admin to avoid listing emails along the top
Moves emails to a table on the settings screen.

Also tweaks some section text and moves descriptions to tooltips for a
less cluttered interface.
2015-11-02 16:27:00 +00:00
Mike Jolley 48b93b937f Added admin order/payment failed notification
Closes #8617
2015-11-02 14:45:24 +00:00
Mike Jolley 9ac43ec4d4 Cleanup 2015-11-02 13:02:23 +00:00
Mike Jolley 798cf9a50b Merge pull request #9485 from helgatheviking/email-ids-on-hooks
pass email object to email templates and template hooks
2015-11-02 13:02:04 +00:00
Mike Jolley 7fdb93329c Merge branch 'revised-single-variation-cart-template'
Conflicts:
	includes/admin/views/html-admin-page-status-report.php
2015-11-02 11:26:49 +00:00
Mike Jolley c29517e87e Merge branch 'pr/9471' 2015-11-02 11:24:01 +00:00
Mike Jolley aec0e0e327 supports() method which mirrors gateways
Closes #9471
2015-11-02 11:23:50 +00:00
Mike Jolley 3ca5022649 Added template files for the customer details list in emails. emails/email-customer-details.php
Closes #9253
2015-11-02 10:41:05 +00:00
Mike Jolley dfc1e0a625 Merge remote-tracking branch 'origin/master'
Conflicts:
	includes/admin/views/html-admin-page-status-report.php
2015-11-02 10:02:35 +00:00
Mike Jolley 781adc121c Check parent theme version
Closes #9477
2015-11-02 10:01:42 +00:00
Mike Jolley f4c24ee824 Make from name methods match 2015-11-02 09:11:25 +00:00
Claudio Sanches 494dd9dae2 Merge pull request #9482 from ahmadawais/patch-5
Better Documentation: Period Endings
2015-11-01 19:24:14 -02:00
Kathy Darling f893d73af6 pass email object to email templates and template hooks 2015-10-31 23:04:59 -05:00
Ahmad Awais d690e43345 Better Documentation: Period Endings
As per the [PHP documentation standards in the core handbook](https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/), this commit helps make the documentation better by adding:

- Period endings
2015-11-01 00:12:12 +05:00
Ahmad Awais 9954602229 Better Documentation: Period Endings
As per the [PHP documentation standards in the core handbook](https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/), this commit helps make the documentation better by adding:

- Period endings
- Short descriptions
- Long descriptions
2015-11-01 00:10:45 +05:00
Claudio Sanches ecb3ca2ea3 Merge pull request #9480 from ahmadawais/patch-3
Better Documentation: Period Endings
2015-10-31 17:05:38 -02:00
Claudio Sanches 317aeb39f1 Merge pull request #9478 from WPprodigy/system-status-fix2
Typo in system status report
2015-10-31 17:03:48 -02:00
Ahmad Awais b07854ed77 Better Documentation: Period Endings 2015-11-01 00:01:46 +05:00
Caleb Burks 46b43f4c7c Typo in system status report 2015-10-31 12:00:51 -04:00
Caleb Burks 10bb2c6ca1 Check for child themes in the .org repo 2015-10-31 11:23:07 -04:00
Kathy Darling 856d192bff Use generic `ajax_add_to_cart` class for adding items in the loop to the cart via ajax. 2015-10-30 12:54:49 -05:00
Mike Jolley 37ed73f5b4 Merge pull request #9469 from javorszky/fix-dockblock-ipnhandler
Fix docblock for validate_receiver_email
2015-10-30 15:26:03 +00:00
Gabor Javorszky 2fce596b25 Fix docblock for validate_receiver_email 2015-10-30 15:11:41 +00:00
Claudio Sanches a8ddd8acf9 Disabled Jetpack for products
Implemented the new Jetpack jetpack_comment_form_enabled_for_* filter

Closes #9152
2015-10-30 13:08:44 -02:00