WC_Gateway_Paypal_Request::get_paypal_order_purchase_unit_amountpublicWC 1.0

Deprecated since 0.5.0. It is no longer supported and may be removed in future releases. Use Automattic\WooCommerce\Gateways\PayPal\Request::get_paypal_order_purchase_unit_amount(). This method will be removed in 11.0.0 instead.

Get the amount data for the PayPal order purchase unit field.

Method of the class: WC_Gateway_Paypal_Request{}

No Hooks.

Returns

Array.

Usage

$WC_Gateway_Paypal_Request = new WC_Gateway_Paypal_Request();
$WC_Gateway_Paypal_Request->get_paypal_order_purchase_unit_amount( $order );
$order(WC_Order) (required)
Order object.

Changelog

Deprecated since 10.5.0 Use Automattic\WooCommerce\Gateways\PayPal\Request::get_paypal_order_purchase_unit_amount() instead. This method will be removed in 11.0.0.

WC_Gateway_Paypal_Request::get_paypal_order_purchase_unit_amount() code WC 10.8.1

public function get_paypal_order_purchase_unit_amount( $order ) {
	wc_deprecated_function( __METHOD__, '10.5.0', 'Automattic\WooCommerce\Gateways\PayPal\Request::get_paypal_order_purchase_unit_amount()' );
	if ( ! $this->request ) {
		$this->request = new PayPalRequest( $this->gateway );
	}
	return $this->request->get_paypal_order_purchase_unit_amount( $order );
}