Merge pull request #1803 from andreibarabas/update-shareyourcart
Apply coupons only for shared products
This commit is contained in:
commit
e95509adff
|
@ -17,7 +17,7 @@ class WC_ShareYourCart extends WC_Integration {
|
|||
public function __construct() {
|
||||
$this->id = 'shareyourcart';
|
||||
$this->method_title = __( 'ShareYourCart', 'woocommerce' );
|
||||
$this->method_description = sprintf( __( 'Increase your social media exposure by 10 percent! ShareYourCart helps you get more customers by motivating satisfied customers to talk with their friends about your products. For help with ShareYourCart view the <a href="%s" target="__blank">documentation</a>.', 'woocommerce' ), 'http://www.woothemes.com/woocommerce-docs/user-guide/shareyourcart/' );
|
||||
$this->method_description = __( 'Increase your social media exposure by 10 percent! ShareYourCart helps you get more customers by motivating satisfied customers to talk with their friends about your products. For help with ShareYourCart view the <a href="http://www.woothemes.com/woocommerce-docs/user-guide/shareyourcart/" target="__blank">documentation</a>.', 'woocommerce' );
|
||||
|
||||
// Load the settings.
|
||||
$this->settings = ( array ) get_option( $this->plugin_id . $this->id . '_settings' ); //do not rely on the base implementation of init_settings
|
||||
|
|
|
@ -105,7 +105,7 @@ class ShareYourCartWooCommerce extends ShareYourCartWordpressPlugin{
|
|||
update_post_meta( $post_id, 'expiry_date', '' );
|
||||
update_post_meta( $post_id, 'usage_limit', 1 );
|
||||
update_post_meta( $post_id, 'exclude_product_ids', '' );
|
||||
update_post_meta( $post_id, 'product_ids', '' );
|
||||
update_post_meta( $post_id, 'product_ids', implode(',', $product_unique_ids));
|
||||
update_post_meta( $post_id, 'individual_use', 'yes' );
|
||||
update_post_meta( $post_id, 'coupon_amount', $coupon_value );
|
||||
update_post_meta( $post_id, 'discount_type', $discount_type );
|
||||
|
@ -217,6 +217,7 @@ class ShareYourCartWooCommerce extends ShareYourCartWordpressPlugin{
|
|||
"item_url" => get_permalink($product_id),
|
||||
"item_price" => $product->price,
|
||||
"item_picture_url" => $image,
|
||||
"item_unique_id" => $product_id,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ if(!class_exists('ShareYourCartWordpressPlugin',false)){
|
|||
abstract class ShareYourCartWordpressPlugin extends ShareYourCartBase {
|
||||
|
||||
protected static $_INSTANCES = array();
|
||||
protected static $_VERSION = 5;
|
||||
protected static $_VERSION = 6;
|
||||
protected $_PLUGIN_PATH;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue