Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom table for discount codes - Issue/5277 #6224

Merged
merged 200 commits into from
Feb 15, 2018
Merged

Conversation

pippinsplugins
Copy link
Contributor

@pippinsplugins pippinsplugins commented Dec 6, 2017

Migration to custom tables for discount codes.

#5277

@spencerfinnell
Copy link
Contributor

🎉 @pippinsplugins there are a few method doc blocks in the meta class marking a method as private when it's defined as public.

@sunnyratilal
Copy link
Contributor

@mindctrl Only change I haven't made is prefixing the input names with edd_discount_ because it will break backwards compatibility with anyone hooking on to edd_add_discount. That also reminded me to add backwards compatibility for the old input names.

@@ -874,7 +874,7 @@ jQuery(document).ready(function ($) {

product_requirements : function() {

$('#products').change(function() {
$('#edd_products').change(function() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ID uses an underscore here but the HTML elements class is set up with a hyphen at https://github.com/easydigitaldownloads/easy-digital-downloads/pull/6224/files#diff-2e1c495c5f0ae4bbbaddef446f7f44eeR88

LIMIT %d,%d;
", absint( $args['offset'] ), absint( $args['number'] ) ), 0 );

echo "SELECT id
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This echo shouldn't be here.

case 'post_mime_type' :
case 'comment_count' :
case 'filter' :
case 'post_type' :
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should return edd_discount for post_type to help ensure any custom integrations that check for the post type still function.

@@ -271,18 +335,65 @@ public function __set( $key, $value ) {

// Only real properties can be saved.
$keys = array_keys( get_class_vars( get_called_class() ) );
$old_keys = array(
'is_single_use',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_single_use is in the array twice.

'_edd_discount_name',
'_edd_discount_code',
'_edd_discount_expiration',
'_edd_discount_start',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing a few keys: _edd_discount_is_single_use, _edd_discount_is_not_global, _edd_discount_product_condition, _edd_discount_min_price, _edd_discount_max_uses`.

Same thing at line 998.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And 1052.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And 1094

@sunnyratilal sunnyratilal merged commit ab112e4 into release/3.0 Feb 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants