Automattic\WooCommerce\StoreApi\Routes\V1\Ucp
CatalogSearch::encode_cursor
Encode a pagination offset into an opaque cursor string.
Method of the class: CatalogSearch{}
No Hooks.
Returns
string.
Usage
// private - for code of main (parent) class only $result = $this->encode_cursor( $offset ): string;
- $offset(int) (required)
- Numeric offset.
CatalogSearch::encode_cursor() CatalogSearch::encode cursor code WC 11.3.0
private function encode_cursor( int $offset ): string {
return base64_encode( 'offset:' . $offset ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
}