RNEPO class

Posted by:

The RNEPO class can be used to extract fields from an order it has these methods:

GetFieldsByOrder

GetFieldsByOrder($OrderId)

Parameters

OrderId: The id of the order

Return

An array of IntegrationFields

Example

RNEPO::GetFieldsByOrder(12)
//Returns an array of all the fields of the order 12

GetFieldsByItemId

public static function GetFieldsByItemId($orderId,$itemId)

Parameters

OrderId: The id of the field

ItemId: The id of the item inside the order

Returns

The IntegrationField or null if not found

GetFieldByName

public static function GetFieldByName($orderId,$fieldName,$lineItemId='')

Parameters

OrderId: The id of the order

FieldName: The name ...

Continue Reading →
0

IntegrationField Class

Posted by:

This class represents a field submitted within an order, it is the main object returned by the RNEPO class.

Properties

Order: returns the WC_Order where this field was added.

Line: Returns the WC_Order_Item where this field was added

Entry: An stdclass representation of the field

Methods

public function GetLabel()

Returns

The label of the field

public function GetFieldName()

Returns

The name of the field

public abstract function ToText()

Returns

A text representation of the value of the entry

public function ToHTML()

Returns

An ...

Continue Reading →
0