1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11886],{10864:(e,n,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/Classes/BigCommerce/Currency/Currency",function(){return r(70316)}])},70316:(e,n,r)=>{"use strict";r.r(n),r.d(n,{default:()=>l,useTOC:()=>h});var s=r(74848),i=r(27849),c=r(40272),t=r(71355);function h(e){return[{value:"Constants",id:"constants",depth:2},{value:"Methods",id:"methods",depth:2},{value:"get_currency_code",id:"get_currency_code",depth:3},{value:"set_currency_code",id:"set_currency_code",depth:3},{value:"set_currency_code_cookie",id:"set_currency_code_cookie",depth:3},{value:"get_channel_aware_currencies",id:"get_channel_aware_currencies",depth:3}]}let l=(0,i.e)(function(e){let{toc:n=h(e)}=e,r={blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",span:"span",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.hr,{}),"\n",(0,s.jsx)(r.h1,{children:"Currency"}),"\n",(0,s.jsx)(r.p,{children:"Handles currency operations, including fetching and setting currency codes and managing channel-aware currencies."}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["Full name: ",(0,s.jsx)(r.code,{children:"\\BigCommerce\\Currency\\Currency"})]}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:n[0].id,children:n[0].value}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{style:{textAlign:"left"},children:"Constant"}),(0,s.jsx)(r.th,{style:{textAlign:"left"},children:"Visibility"}),(0,s.jsx)(r.th,{style:{textAlign:"left"},children:"Type"}),(0,s.jsx)(r.th,{style:{textAlign:"left"},children:"Value"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{style:{textAlign:"left"},children:(0,s.jsx)(r.code,{children:"CURRENCY_CODE_COOKIE"})}),(0,s.jsx)(r.td,{style:{textAlign:"left"},children:"public"}),(0,s.jsx)(r.td,{style:{textAlign:"left"}}),(0,s.jsx)(r.td,{style:{textAlign:"left"},children:"âwp-bigcommerce-currency-codeâ"})]})})]}),"\n",(0,s.jsx)(r.h2,{id:n[1].id,children:n[1].value}),"\n",(0,s.jsx)(r.h3,{id:n[2].id,children:n[2].value}),"\n",(0,s.jsx)(r.p,{children:"Retrieves the current currency code."}),"\n",(0,s.jsx)(r.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,s.jsx)(r.code,{children:(0,s.jsxs)(r.span,{children:[(0,s.jsx)(r.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" get_currency_code"}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"(): "}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"})]})})}),"\n",(0,s.jsx)(r.p,{children:"Determines the currency code based on user preferences, cookies, or channel-specific defaults."}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Return Value:"})}),"\n",(0,s.jsx)(r.p,{children:"The current currency code."}),"\n",(0,s.jsx)(r.hr,{}),"\n",(0,s.jsx)(r.h3,{id:n[3].id,children:n[3].value}),"\n",(0,s.jsx)(r.p,{children:"Sets the currency code for the current user and stores it in a cookie."}),"\n",(0,s.jsx)(r.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,s.jsx)(r.code,{children:(0,s.jsxs)(r.span,{children:[(0,s.jsx)(r.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" set_currency_code"}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $currency_code): "}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"bool"})]})})}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Parameters:"})}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"$currency_code"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.strong,{children:"string"})}),(0,s.jsx)(r.td,{children:"The currency code to set."})]})})]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Return Value:"})}),"\n",(0,s.jsx)(r.p,{children:"True if the currency code was successfully set; otherwise, false."}),"\n",(0,s.jsx)(r.hr,{}),"\n",(0,s.jsx)(r.h3,{id:n[4].id,children:n[4].value}),"\n",(0,s.jsx)(r.p,{children:"Sets a cookie to store the currency code."}),"\n",(0,s.jsx)(r.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,s.jsx)(r.code,{children:(0,s.jsxs)(r.span,{children:[(0,s.jsx)(r.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" set_currency_code_cookie"}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:"("}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"string"}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"},children:" $currency_code): "}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#005CC5","--shiki-dark":"#79B8FF"},children:"void"})]})})}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Parameters:"})}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Parameter"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsx)(r.tbody,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"$currency_code"})}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.strong,{children:"string"})}),(0,s.jsx)(r.td,{children:"The currency code to store in the cookie."})]})})]}),"\n",(0,s.jsx)(r.hr,{}),"\n",(0,s.jsx)(r.h3,{id:n[5].id,children:n[5].value}),"\n",(0,s.jsx)(r.p,{children:"Retrieves channel-aware currencies for the current store or channel."}),"\n",(0,s.jsx)(r.pre,{tabIndex:"0","data-language":"php","data-word-wrap":"",children:(0,s.jsx)(r.code,{children:(0,s.jsxs)(r.span,{children:[(0,s.jsx)(r.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"public"}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#6F42C1","--shiki-dark":"#B392F0"},children:" get_channel_aware_currencies"}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#24292E","--shiki-dark":"#E1E4E8"}
1,children:"(): "}),(0,s.jsx)(r.span,{style:{"--shiki-light":"#D73A49","--shiki-dark":"#F97583"},children:"array"})]})})}),"\n",(0,s.jsx)(r.p,{children:"Filters the enabled currencies based on the current channelâs allowed currencies."}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Return Value:"})}),"\n",(0,s.jsx)(r.p,{children:"The list of channel-aware currencies."}),"\n",(0,s.jsx)(r.hr,{}),"\n",(0,s.jsx)(r.hr,{}),"\n",(0,s.jsxs)(r.blockquote,{children:["\n",(0,s.jsx)(r.p,{children:"Automatically generated on 2025-01-21"}),"\n"]})]})},"/Classes/BigCommerce/Currency/Currency",{filePath:"pages/Classes/BigCommerce/Currency/Currency.md",timestamp:1737496368e3,pageMap:c.O,frontMatter:{},title:"Currency"},"undefined"==typeof RemoteContent?h:RemoteContent.useTOC)}},e=>{var n=n=>e(e.s=n);e.O(0,[27849,40272,90636,46593,38792],()=>n(10864)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.