ALWAYS_USE_LICENSE_KEYS_OPTION
ALWAYS_USE_LICENSE_KEYS_OPTION
bright_license_field_update_order_meta( $order_id) : boolean
This is a callback from the woocommerce_checkout_update_order_meta action. It has the effect of setting the 'bright_license' field on the order.
$order_id |
returns true if order successfully updated.
bright_set_license_field_on_checkout( $order_id)
This is the default function called on checkout, to determine if this is a license order.
To replace with your own function, do:
add_filter('bright_set_license_field_on_checkout', function ($function_name) { return "\SomeNamespace\bright_set_license_field_on_checkout"; }, 10, 1);
for example.
$order_id |
generate_order_details( $order, Array $args = array())
Adds order details to the Woocommerce Checkout Page.
$order | ||
Array | $args | if 'show-registration-link' is set, a table row will be generated which links to the WP registration page with the license key encoded as a query parameter. |
is_cart_a_probable_license_purchase() : Boolean
Returns true if product is a bright product, and one of the following is true: 1. the item quantity is greater than 1.
No arguments is taken, access to the cart is via the global $woocommerce variable.
set_license_order(integer $order_id, String $value) : boolean
Sets the bright_license field for an order. If value is '1' [or possibly other true values], Bright will manage as a license order.
integer | $order_id | ID of the order |
String | $value | value to set the metadata field as. |
returns true if correctly set.