EECO_WCO_DB_VERSION
public
mixed
EECO_WCO_DB_VERSION
= '1.7'
WooCommerce Quote Requests
public
mixed
EECO_WCO_DB_VERSION
= '1.7'
public
mixed
EECO_WCO_PATH
= untrailingslashit(plugin_dir_path(__FILE__))
public
mixed
EECO_WCO_ROOT
= plugin_dir_path(__FILE__)
public
mixed
EECO_WCO_URL
= plugin_dir_url(__FILE__)
public
mixed
EECO_WCO_VERSION
= '1.0.3'
initialize plugin
init_eeco_wco() : mixed
activate plugin
activate_eeco_wco() : mixed
deactivate plugin
deactivate_eeco_wco() : mixed
the default settings used on the settings page
eeco_wco_default_settings([bool $keys = false ]) : array<string|int, mixed>
Whether to only return setting keys
Default settings of WCO
returns the given template contents
eeco_wco_get_template(string $template[, mixed $args = array() ]) : mixed
The template name
returns if user logged in
eeco_wco_is_user_logged_in() : bool
true if user logged in, false if not
create offer to database
wco_create_offer(int $post_id, int $user_id, string $type, string $taxes, float $value, string $status, string $expiry_date) : int
id of a post
id of a user
of an offer
coupon taxes to taxable or tax free price
float of offer value
status of an offer
expiry date of an offer
$result id of offer created
returns all user offers
wco_get_offers([int $user_id = null ][, string|array<string|int, mixed> $status = 'all' ]) : array<string|int, mixed>
id of user
Offer status or statuses
of offers for user
returns an offer
wco_get_offer(int $post_id) : object
of offer id
offer
edit an offer in database
wco_edit_offer(int $post_id, string $type, string $taxes, float $value, string $status, string $expiry_date) : bool
id of a post
of an offer
coupon taxes to taxable or tax free price
float of offer value
status of an offer
expiry date of an offer
true || false if offer updated
Add products
wco_add_product(int $post_id, int $product_id, int $quantity, float $total, float $tax) : int
of an offer
of product to add
quantity of product to add
line total of cart item
tax total of cart item
true|false if successfully added
Get offer products by post id
wco_get_products(int $post_id) : array<string|int, mixed>
if of an offer
products for an offer
Get all offer products
wco_get_offer_products( $offerID) : array<string|int, mixed>
all products for an offer
Add coupon to offer
wco_coupon_to_offer(int $post_id, string $coupon_name) : bool
id of an offer
name of a coupon
true || false if coupon added to offer successfully
Get all products for a coupon
wco_get_coupon_products(int $coupon) : array<string|int, mixed>
id of a coupon
products for a coupon
Set used coupon inactive after checkout
wco_set_coupon_inactive(int $coupon, int $order_id) : bool
id of a coupon
id of a order where coupon is used
true || false if updated
Get offer by coupon code
wco_get_offer_by_coupon(int $coupon) : object
id of a coupon
offer
Update offer coupon
wco_update_offer_coupon(int $post_id, int $coupon) : bool
id of an offer
id of a coupon
true || false if updated rows
Set offer as top manager declined
wco_decline_offer(int $post_id) : bool
id of an offer
true || false if offer updated
Get all pending offers
get_pending_offer_count() : array<string|int, mixed>
all pending offers
Get all active offers
get_active_offer_count(int $userID) : array<string|int, mixed>
id of user
all active offers
Set offer as customer declined
wco_customer_decline_offer(int $post_id) : bool
of offer edited
true || false if offer edited
Set offer as customer cancelled
wco_cancel_offer(int $post_id) : bool
of offer cancelled
true || false if offer cancelled
Disable add to cart if wco coupon active in cart
wco_disable_add_to_cart(mixed $passed, mixed $product_id, mixed $quantity) : bool
true || false if disabled or not
Remove add to cart button when cart offer coupon active for user
wco_remove_add_to_cart() : mixed
Register emails classes
eeco_wco_register_emails(array<string|int, mixed> $emails) : array<string|int, mixed>
array of email classes
Array of email classes
add email actions
eeco_wco_email_actions(array<string|int, mixed> $actions) : array<string|int, mixed>
The current actions
Array of email actions
Generate the product table used in emails
eeco_wco_get_email_table_template(mixed $offer[, mixed $type = 'product' ]) : string
Table html
Register scheduled event that triggers function eeco_wco_expiring_offer daily
eeco_wco_scheduled_event() : mixed
Check daily if offer is going to expire
eeco_wco_expiring_offer() : mixed
get_offer_values(array<string|int, mixed> $status[, datetime $start = '1970-01-01 00:00:00' ][, datetime $end = '2500-01-01 23:59:59' ]) : int
Array of offer statuses
Start date Y-m-d H:i:s
End date Y-m-d H:i:s
Total value of given offers
Get discounted price for quote
get_offer_discount(object $offer) : string
Offer
Discounted price of the quote wc_price()
Get discount value for quote
get_offer_discount_value(object $offer) : int
Offer
Discount value
get_admin_dates_offer_values(mixed $status[, mixed $start = '1970-01-01' ][, mixed $end = '2500-01-01' ]) : mixed