Commit Graph

25439 Commits

Author SHA1 Message Date
Rodrigo Primo ea0d95abbd Bump minimum required Node and NPM version to latest stable versions
We need to make sure everyone is running Node 8 to avoid package-lock.json related issues for people running Node 6.
2017-12-21 13:23:53 -02:00
Rodrigo Primo 5523747053 Add package-lock.json to the repository
As recommended by NPM documentation and to make sure everyone is using the same versions of all dependencies.

https://docs.npmjs.com/files/package-lock.json
2017-12-21 13:18:14 -02:00
claudiulodro 28db1c270a Use text color for links 2017-12-21 06:35:55 -08:00
Claudiu Lodromanean 4f94d9dbbc
Merge pull request #18247 from AdamQuadmon/wc-exporter-custom-filters
Add product export row action hook
2017-12-21 06:02:56 -08:00
Shiva Poudel 0ec0ca29a2 Only load session handler class on frontend not during cron
Ref: #18193

CC @mikejolley
2017-12-21 10:16:13 +05:45
Luciano Amodio 1b42973b75 Add export ajax query args and filename filter hooks
`woocommerce_export_get_ajax_query_args` let you pass args to ajax actions
`woocommerce_{$this->export_type}_export_get_filename` let you change the filename
2017-12-20 21:20:02 +01:00
claudiulodro 1c8dd6acbb Proposed fix for api coupon recalculating 2017-12-20 11:37:35 -08:00
Luciano Amodio 865efa3736 Add product export row action hook
having this hook is possible to actually use the woocommerce_product_export_product_query_args filter

```
add_action('woocommerce_product_export_row', 'export_custom_product');
add_filter( 'woocommerce_product_export_product_query_args', 'export_product_query_args');

// https://github.com/woocommerce/woocommerce/wiki/wc_get_products-and-WC_Product_Query
add_filter( 'woocommerce_product_data_store_cpt_get_products_query', 'handle_custom_query_var', 10, 2 );

function export_custom_product() {
  $args = [
    'show_option_all' =>  'Custom',
    'taxonomy'        =>  'pa_custom',
    'name'            =>  'custom',
    'orderby'         =>  'name',
    'order'           => 'ASC',
    'selected'        =>  isset($_REQUEST['custom']) ? $_REQUEST['custom'] : '',
    'show_count'      =>  true,
    'hide_empty'      =>  true,
    'menu_order'      => false
  ];
  ?>
  <tr>
    <th scope="row">
      <label for="custom">Filter by Custom</label>
    </th>
    <td>
      <?php wp_dropdown_categories($args); ?>
    </td>
  </tr>
  <?php
}

function export_product_query_args($args) {
  $args['custom'] = 'default';

  if ( ! empty( $_POST['form'] ) ) {
    $values = explode('=', $_POST['form']);
    if('custom' === $values[0]) {
      $args['custom'] = wp_unslash( $values[1] );
    }
  }

  return $args;
}

function handle_custom_query_var( $query, $query_vars ) {
  if ( ! empty( $query_vars['custom'] ) ) {
    $query['tax_query'][] = array(
      'taxonomy' => 'pa_ custom',
      'field' => 'id',
      'terms' => esc_attr( $query_vars['custom'] )
    );
  }

  return $query;
}
```
2017-12-20 20:13:10 +01:00
Claudiu Lodromanean 59ccb00e49
Merge pull request #18242 from lipemat/fix/date-args-wpcli-wc-product_review
Fix --date_created and --date_created_gmt args for wc product_review
2017-12-20 10:07:18 -08:00
Claudio Sanches 8bdc9a6a1d Fixed coding standards 2017-12-20 15:49:50 -02:00
Claudiu Lodromanean 0c29a301a4
Merge pull request #18243 from iamchetanp/patch-1
Remove space before comma in function call
2017-12-20 09:37:20 -08:00
Claudiu Lodromanean 6766ba2549
Merge pull request #18208 from MannyC/master
Allow back end to pass adhoc options to the product flexslider
2017-12-20 09:36:29 -08:00
Claudio Sanches 3877c82677
Merge pull request #18237 from alexminza/master
Added Moldova states
2017-12-20 15:10:36 -02:00
Claudio Sanches 1cd6fa5fae
Merge pull request #18234 from woocommerce/add/order-item-tests
More WC_Order_Item_Product tests
2017-12-20 15:05:42 -02:00
Chetan Prajapati 325cbf443d
Remove space before comma in function call
There is PHPCS error about "Remove space before comma in function call". That needs to be removed.
2017-12-20 22:07:48 +05:30
lipemat c4cb7d146a support --date_created and --date_created_gmt via wp-cli wc product_review create 2017-12-20 09:54:42 -05:00
MannyC 1252215dc2 Change flexslider options property name back to just `flexslider` from `flexslider_options`. 2017-12-20 12:15:45 +00:00
Kelly Dwan 70455b79a3 Add failing tests to demonstrate problem adding & removing coupons 2017-12-19 16:46:26 -05:00
Alexander Minza eea61cbe79 Added Moldova states 2017-12-19 23:44:58 +02:00
Alexander Minza fca5ef8dd8 Added Moldova states 2017-12-19 23:44:25 +02:00
Claudiu Lodromanean 5349ffbb47
Merge pull request #18233 from woocommerce/fix/18232
Fixed file log dates and implement better date formatting
2017-12-19 11:53:06 -08:00
claudiulodro b7c659ca07 Fix php <=5.6 errors 2017-12-19 11:37:37 -08:00
Claudio Sanches 068418124e
Merge pull request #18203 from AdamQuadmon/wc-exporter-limit-filter
Add WC Product CSV Exporter limit filter
2017-12-19 15:42:38 -02:00
Claudio Sanches f40f3291f8 Fixed file log dates and implement better date formatting
Closes #18232
2017-12-19 15:38:50 -02:00
claudiulodro cff662ac47 phpcs 2017-12-19 09:30:02 -08:00
Luciano Amodio bec2e939b4 change filter name 2017-12-19 18:25:16 +01:00
claudiulodro 3461fd2a3a Array access tests 2017-12-19 09:22:17 -08:00
Claudiu Lodromanean 2c6a39716f
Merge pull request #18231 from woocommerce/fix/18225
Apply woocommerce_short_description filter before check if excerpt is empty
2017-12-19 08:39:25 -08:00
Claudio Sanches 7b6f236bf1
Merge pull request #18229 from woocommerce/hotfix-updates-word-in-wc-plugin-description
Updates plugin description…
2017-12-19 14:27:20 -02:00
Claudio Sanches 9413589e8f Apply woocommerce_short_description filter before check if excerpt is empty
Closes #18225
2017-12-19 14:19:12 -02:00
Luciano Amodio 8983b38598 change filter name and position `woocommerce_product_export_get_limit` 2017-12-19 17:18:55 +01:00
Claudio Sanches a29ebb6701
Merge pull request #18224 from unfulvio/issue-18223
[#18223] Add argument to woocommerce_product_related_posts_query filter
2017-12-19 12:14:40 -02:00
Gareth Allison 29cc03c798 Updates the word `e-commerce` to `eCommerce` in the plugin description to be in line with the Woo and Automattic language & writing style. 2017-12-19 16:12:07 +02:00
Luciano Amodio f383886fb5 fix not needed double quotes 2017-12-19 14:51:23 +01:00
Luciano Amodio 4d267c0dbb Rename exporter filter to `woocommerce_product_export_init`
moving it in the abstract constructor and let it be more generic now is possible to do:
```
add_filter( 'woocommerce_product_export_init', function ( $exporter ) {
  if( 'product' === $exporter->export_type ) {
    $exporter->set_limit(100);
  }
});
2017-12-19 13:50:37 +01:00
Fulvio Notarstefano e718d7bd40 [#18223] Rename var to a more apt name 2017-12-19 17:19:10 +08:00
Fulvio Notarstefano ee123fb739 [#18223] Add argument to woocommerce_product_related_posts_query filter 2017-12-19 10:18:33 +08:00
claudiulodro 2c884c0003 Progress on order item tests 2017-12-18 14:45:39 -08:00
Claudiu Lodromanean e898623668
Merge pull request #18174 from woocommerce/fix/18170
Adjusts price filter code to exclude taxes to match how prices are stored in the DB
2017-12-18 11:13:44 -08:00
Claudiu Lodromanean b494e45865
Merge pull request #18193 from woocommerce/fix/16940
Do not load SESSION class during CRON events
2017-12-18 10:47:07 -08:00
Claudio Sanches 2d06a08cfe Updated pre-commit hook 2017-12-18 15:03:11 -02:00
Claudiu Lodromanean aa85dd03d6
Merge pull request #18214 from WPprodigy/fix-duplicate-checkout-ids
Prevent duplicate IDs on checkout page
2017-12-18 08:49:40 -08:00
Mike Jolley 6fd3d9c100 Compare the date modified when loading session data. 2017-12-18 16:43:18 +00:00
Claudiu Lodromanean 052fbc73c6
Merge pull request #18212 from WPprodigy/hide-add-coupon
Only show 'Apply coupon' in admin if coupons are enabled
2017-12-18 08:41:12 -08:00
Claudio Sanches d2404a9e63 Fixed chmod 2017-12-18 14:12:53 -02:00
Mike Jolley fb8d959c58
Merge pull request #18218 from shivapoudel/delete-transient
Remove unwanted transient then were not set
2017-12-18 16:02:36 +00:00
Claudio Sanches e68c28589b
Merge pull request #18216 from woocommerce/update/phpcs-ruleset-file-name
Use default name for PHPCS configuration file
2017-12-18 12:56:25 -02:00
Shiva Poudel 0432b58182 Remove unwanted transient then were not set 2017-12-18 20:03:08 +05:45
Claudiu Lodromanean df2aded066 WC_Query unit tests (#18180)
* Begin WC_Query tests

* Some tests

* WC_Query unit tests
2017-12-18 12:01:27 -02:00
Gerhard Potgieter 25c4a84491 Add more core-functions unit tests (#18190)
* Pass through additional args to wc_create_order in test

* Pass extra args to wc_create_order to improve coverage, test WP_Error check of wc_create_order

* wc_get_template_part test

* wc_enqueue_js test

* wc_get_log_file_name test

* wc_get_page_children test

* hash_equals test

* wc_rand_hash test

* wc_transaction_query test

* Fix script test and phpcs stuff

* Fix widget tests

* Move tests to correct file and fix phpcs
2017-12-18 11:58:40 -02:00