FoxyCart / foxyshop

FoxyShop - WordPress plugin for FoxyCart
GNU General Public License v2.0
10 stars 8 forks source link

foxyshop_get_product_by_name adding support for post title #5

Closed jacobdubail closed 7 years ago

jacobdubail commented 7 years ago

Adding support for post_title in the shortcode helper.

Not sure why the entire file decided to be re-written. Probably sublime text encoding on my end.

sparkweb commented 7 years ago

It was probably line endings or something. Is the only change this line?

$post = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE ( post_name = %s OR post_title = %s ) AND post_type='foxyshop_product'", $post_name, $post_name ));

If so, I'll just add this directly.

jacobdubail commented 7 years ago

Yup, that's the only change. Thanks, David!

sparkweb commented 7 years ago

I just pushed this in directly.